#include <mutex.h>
Collaboration diagram for MutexLock:
void foo() { MutexLock kLock( &kSomeMutex );
//kSomeMutex is now locked if( someTestThatFails() ) return;
doSomething();
} //The kSomeMutex is automatically unlocked whenever the function returns //since the kLock object is destroyed when it runs out of scope
Public Member Functions | |
MutexLock (MutexObject *pkMutexObject) | |
virtual | ~MutexLock () |
Private Attributes | |
MutexObject * | m_pkMutexObject |
|
Lock mutex object
|
|
Unlock mutex object |
|
Mutex object we have locked |