#include <CLock.h>
Collaboration diagram for CLock:
Public Member Functions | |
CLock (const CMutex *mutex) | |
Lock the mutex mutex . | |
CLock (const CCondVarBase *cv) | |
Lock the condition variable cv . | |
~CLock () | |
Unlock the mutex or condition variable. |
This class locks a mutex or condition variable in the c'tor and unlocks it in the d'tor. It's easier and safer than manually locking and unlocking since unlocking must usually be done no matter how a function exits (including by unwinding due to an exception).
Definition at line 30 of file CLock.h.