Public Member Functions

mbi_runtime_lock Class Reference

acquire and release big runtime lock More...

#include <mbi_runtime_lock.h>

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

mbi_runtime_lock::mbi_runtime_lock ( mb_runtime_base rt  )  [inline]
mbi_runtime_lock::mbi_runtime_lock ( mb_mblock_impl mi  )  [inline]
mbi_runtime_lock::mbi_runtime_lock ( mb_mblock mb  )  [inline]
mbi_runtime_lock::~mbi_runtime_lock ( void   )  [inline]

The documentation for this class was generated from the following file: