acquire and release big runtime lock More...
#include <mbi_runtime_lock.h>
Public Member Functions | |
mbi_runtime_lock (mb_runtime_base *rt) | |
mbi_runtime_lock (mb_mblock_impl *mi) | |
mbi_runtime_lock (mb_mblock *mb) | |
~mbi_runtime_lock (void) |
acquire and release big runtime lock
As an alternative to: { rt->lock(); ..... rt->unlock(); }
you can use a single instance of the mbi_runtime_lock class:
{ mbi_runtime_lock l(rt); .... }
This has the advantage that rt->unlock() will be called automatically when an exception is thrown.
mbi_runtime_lock::mbi_runtime_lock | ( | mb_runtime_base * | rt | ) | [inline] |
References mb_runtime_base::lock().
mbi_runtime_lock::mbi_runtime_lock | ( | mb_mblock_impl * | mi | ) | [inline] |
References mb_runtime_base::lock().
mbi_runtime_lock::mbi_runtime_lock | ( | mb_mblock * | mb | ) | [inline] |
References mb_runtime_base::lock().
mbi_runtime_lock::~mbi_runtime_lock | ( | void | ) | [inline] |
References mb_runtime_base::unlock().