AutoLock Class Reference

Helper class to lock an object within a certain scope. More...

#include <lock.h>

Collaboration diagram for AutoLock:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AutoLock (Lock &lock, string l)
 AutoLock (Lock *lock, string l)
 ~AutoLock ()

Detailed Description

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.


Constructor & Destructor Documentation

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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2