Helper class to lock an object within a certain scope. More...
#include <lock.h>

Public Member Functions | |
| AutoLock (Lock &lock, string l) | |
| AutoLock (Lock *lock, string l) | |
| ~AutoLock () | |
Helper class to lock an object within a certain scope.
The Synchronized(Lock) macro will allocate an AutoLock in the current scope. As soon as the control flow goes out of scope, the lock will automatically be released. E.g Synchronized(active-object) will lock the object Synchronized(this) will lock this object for the duration of the scope.
| AutoLock::AutoLock | ( | Lock & | lock, | |
| string | l | |||
| ) | [inline] |
waits until lock is locked
References Lock::wait_lock().
| AutoLock::AutoLock | ( | Lock * | lock, | |
| string | l | |||
| ) | [inline] |
waits until lock is locked
References Lock::wait_lock().
| AutoLock::~AutoLock | ( | ) | [inline] |
unlocks the underlying lock
References Lock::unlock().
1.6.2