#include <MutexImpl.h>
Public Member Functions | |
MutexImpl () | |
~MutexImpl () | |
void | acquire () |
void | release () |
bool | tryAcquire (unsigned long timeout) |
ZThread::MutexImpl< List, Behavior >::MutexImpl | ( | ) | [inline] |
Create a new MutexImpl
Initialization_Exception | thrown if resources could not be properly allocated |
ZThread::MutexImpl< List, Behavior >::~MutexImpl | ( | ) |
Destroy this MutexImpl and release its resources
void ZThread::MutexImpl< List, Behavior >::acquire | ( | ) |
Acquire a lock on the mutex. If this operation succeeds the calling thread holds an exclusive lock on this mutex, otherwise it is blocked until the lock can be acquired.
Deadlock_Exception | thrown when the caller attempts to acquire() more than once, If the checking flag is set. | |
Interrupted_Exception | thrown when the caller status is interrupted | |
Synchronization_Exception | thrown if there is some other error. |
void ZThread::MutexImpl< List, Behavior >::release | ( | ) |
Release a lock on the mutex. If this operation succeeds the calling thread no longer holds an exclusive lock on this mutex. If there are waiting threads, one will be selected, assigned ownership and specifically awakened.
InvalidOp_Exception | - thrown if an attempt is made to release a mutex not owned by the calling thread. |
bool ZThread::MutexImpl< List, Behavior >::tryAcquire | ( | unsigned long | timeout | ) |
Acquire a lock on the mutex. If this operation succeeds the calling thread holds an exclusive lock on this mutex. If the lock cannot be obtained before the timeout expires, the caller returns false.
Deadlock_Exception | thrown when the caller attempts to acquire() more than once, If the checking flag is set. | |
Interrupted_Exception | thrown when the caller status is interrupted | |
Synchronization_Exception | thrown if there is some other error. |