#include <PlainMutex.h>
Inheritance diagram for ZThread::PlainMutex::
Public Methods | |
PlainMutex () throw (Synchronization_Exception) | |
virtual | ~PlainMutex () throw () |
virtual void | acquire () throw (Synchronization_Exception) |
virtual bool | tryAcquire (unsigned long) throw (Synchronization_Exception) |
virtual void | release () throw (Synchronization_Exception) |
This mutex will perform checks before a wait is started to see if the thread has been interrupted. However, once a thread is blocked by this mutex it can't be interrupted.
The Mutex class provides a mutex implementation that allows interrupts The CheckedMutex provides a mutex with some error checking functionality
|
Allocate a new mutex
|
|
Destroy this PlainMutex object |
|
Acquire a lock on this mutex. If the thread has been interrupted before the lock is a acquired this function will throw an exception If the thread is interrupted after it has started to wait for this mutex it can not be interrupted. Acquiring this mutex twice will result in deadlock.
Reimplemented from ZThread::Lockable. |
|
Release a lock held on this mutex. Releasing a lock twice is not guaranteed to throw an InvalidOp exception. This may have an unpredictable or at least undetected result. It should not be done Once released, another thread may acquire the mutex. No interruption checks are performed in this method
Reimplemented from ZThread::Lockable. |
|
Acquire a lock on this mutex. If the thread has been interrupted before the lock is a acquired this function will throw an exception If the thread is interrupted after it has started to wait for this mutex it can not be interrupted. Acquiring this mutex twice will result in deadlock.
Reimplemented from ZThread::Lockable. |