A wrapper class around a given synchronization mechanism that provides automatic release upon destruction.
More...
#include <src/main/decaf/util/concurrent/Lock.h>
|
| | Lock (Synchronizable *object, const bool intiallyLocked=true) |
| | Constructor - initializes the object member and locks the object if desired. More...
|
| |
| virtual | ~Lock () |
| | Destructor - Unlocks the object if it is locked. More...
|
| |
| void | lock () |
| | Locks the object. More...
|
| |
| void | unlock () |
| | Unlocks the object if it is already locked, otherwise a call to this method has no effect. More...
|
| |
| bool | isLocked () const |
| | Indicates whether or not the object is locked. More...
|
| |
A wrapper class around a given synchronization mechanism that provides automatic release upon destruction.
- Since
- 1.0
| decaf::util::concurrent::Lock::Lock |
( |
Synchronizable * |
object, |
|
|
const bool |
intiallyLocked = true |
|
) |
| |
Constructor - initializes the object member and locks the object if desired.
- Parameters
-
| object | The sync object to control |
| intiallyLocked | If true, the object will automatically be locked. |
| virtual decaf::util::concurrent::Lock::~Lock |
( |
| ) |
|
|
virtual |
Destructor - Unlocks the object if it is locked.
| bool decaf::util::concurrent::Lock::isLocked |
( |
| ) |
const |
|
inline |
Indicates whether or not the object is locked.
- Returns
- true if the object is locked, otherwise false.
| void decaf::util::concurrent::Lock::lock |
( |
| ) |
|
| void decaf::util::concurrent::Lock::unlock |
( |
| ) |
|
Unlocks the object if it is already locked, otherwise a call to this method has no effect.
The documentation for this class was generated from the following file:
- src/main/decaf/util/concurrent/Lock.h