Class to do RAII with a lock. The constructor will acquire the lock and the destructor will delete it. More...
#include <paraPthLock.h>
Public Member Functions | |
LockRAII (Lock *l) | |
Constructor. The constructor calls l->lock() to acquire the lock. More... | |
LockRAII (Lock *l, char const *file, int line) | |
Constructor. The constructor calls l->lock(file,line) to acquire the lock. More... | |
~LockRAII () | |
Destructor. Releases the lock that was acquired in the constructor. More... | |
Private Member Functions | |
LockRAII (LockRAII const &) | |
No copying or assignment for instances of this class. More... | |
LockRAII const & | operator= (LockRAII const &) |
Private Attributes | |
Lock *const | lck |
lock More... | |
Class to do RAII with a lock. The constructor will acquire the lock and the destructor will delete it.
Definition at line 178 of file paraPthLock.h.
Constructor. The constructor calls l->lock() to acquire the lock.
Definition at line 196 of file paraPthLock.h.
References LockRAII::lck, and Lock::lock().
Constructor. The constructor calls l->lock(file,line) to acquire the lock.
Definition at line 210 of file paraPthLock.h.
References LockRAII::lck, and Lock::lock().
~LockRAII | ( | ) |
Destructor. Releases the lock that was acquired in the constructor.
Definition at line 225 of file paraPthLock.h.
References LockRAII::lck, and Lock::unlock().
|
private |
lock
Definition at line 180 of file paraPthLock.h.
Referenced by LockRAII::LockRAII(), and LockRAII::~LockRAII().