Is an object that is convenient to use when a mutex should be locked and unlocked automaticly when returning.
More...
List of all members.
Detailed Description
Is an object that is convenient to use when a mutex should be locked and unlocked automaticly when returning.
Example:
int function() { MutexLocker lock( myMutex ); Do whatever you want to do }
Constructor & Destructor Documentation
| Threads::MutexLocker::MutexLocker |
( |
Mutex & |
mutex, |
|
|
bool |
wait = true | |
|
) |
| | |
| Threads::MutexLocker::~MutexLocker |
( |
|
) |
|
Member Function Documentation
| bool Threads::MutexLocker::isLocked |
( |
|
) |
const |
| void Threads::MutexLocker::lock |
( |
|
) |
|
Use at own risk! To be safe, it should only be called by the process that created the lock, and have called the unLock().
| void Threads::MutexLocker::unLock |
( |
|
) |
|
Use at own risk! To be safe, it should only be called by the process that created the lock.
Member Data Documentation