Utility class to acquire a lock that is released by the destructor. More...
#include <lock.h>
Public Member Functions | |
Block (Lock *lock=0) | |
Constructor. More... | |
~Block () | |
Destructor. More... | |
void | set (Lock *lock) |
Acquires a lock. More... | |
bool | try_set (Lock *lock) |
Tries to acquire a lock. More... | |
void | release () |
Releases the lock. More... | |
Utility class to acquire a lock that is released by the destructor.