#include <CountingSemaphore.h>
Inheritance diagram for ZThread::CountingSemaphore::
Public Methods | |
CountingSemaphore (int initialCount=0) throw (Synchronization_Exception) | |
virtual | ~CountingSemaphore () throw () |
void | wait () throw (Synchronization_Exception) |
bool | tryWait (unsigned long) throw (Synchronization_Exception) |
void | post () throw (Synchronization_Exception) |
virtual int | count () throw () |
virtual bool | tryAcquire (unsigned long) throw (Synchronization_Exception) |
virtual void | acquire () throw (Synchronization_Exception) |
virtual void | release () throw (Synchronization_Exception) |
|
Create a new semaphore of a given size with a given count
|
|
Destroy this Semaphore |
|
Decrements the semaphore. If the count is 0 - block until its raised above 0.
Reimplemented from ZThread::Lockable. |
|
Current count of this Semaphore
|
|
This method will increment the semaphore count by one, if any threads were wait()ing on this semaphore - then one will be unblocked. An exception will not be thrown because a range has been exceeded |
|
Increment the semaphore
Reimplemented from ZThread::Lockable. |
|
Decrements the semaphore. If the count is 0 - block until its raised above 0.
Reimplemented from ZThread::Lockable. |
|
|
|
|