Mutual exclusion lock utility. More...
|CLock (const CMutex *mutex)|
|Lock the mutex |
|CLock (const CCondVarBase *cv)|
|Lock the condition variable |
|Unlock the mutex or condition variable. |
Mutual exclusion lock utility.
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).