TNL::Mutex class Reference
TNL::Mutex Class Reference
#include <tnlThread.h>
Detailed Description
Platform independent Mutual Exclusion implementation.
Constructor & Destructor Documentation
Member Function Documentation
void TNL::Mutex::lock |
( |
|
) |
|
|
|
Locks the Mutex.
If another thread already has this Mutex locked, this call will block until it is unlocked. If the lock method is called from a thread that has already locked this Mutex, the call will not block and the thread will have to unlock the mutex for as many calls as were made to lock before another thread will be allowed to lock the Mutex. |
void TNL::Mutex::unlock |
( |
|
) |
|
|
|
Unlocks the Mutex.
The behavior of this method is undefined if called by a thread that has not previously locked this Mutex. |
bool TNL::Mutex::tryLock |
( |
|
) |
|
|
|
Attempts to acquire a lock to this Mutex, without blocking.
Returns true if the calling thread was able to lock the Mutex and false if the Mutex was already locked by another thread. |
Field Documentation