fesa-core
7.0.0
|
This class is used to automatically lock and unlock a mutex. The constructor calls lock() and the destructor calls unlock(). This makes it impossible to leave a block containing a Lock object without unlocking the mutex. The mutex can also be unlocked explicitly, by calling the unlock() method. More...
#include <Lock.h>
Inherits noncopyable.
Public Member Functions | |
Lock (const Mutex &m) | |
Lock the associated mutex. | |
~Lock () | |
unlock the associated mutex | |
void | unlock () |
This class is used to automatically lock and unlock a mutex. The constructor calls lock() and the destructor calls unlock(). This makes it impossible to leave a block containing a Lock object without unlocking the mutex. The mutex can also be unlocked explicitly, by calling the unlock() method.
|
inline |
Unlocks the mutex.