Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CLock Class Reference

Mutual exclusion lock utility. More...

#include <CLock.h>

Collaboration diagram for CLock:

Collaboration graph
[legend]
List of all members.

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.

Detailed Description

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).

Definition at line 30 of file CLock.h.


The documentation for this class was generated from the following files:
Generated on Fri Nov 6 00:21:24 2009 for synergy-plus by  doxygen 1.3.9.1