csCondition Class Reference
A condition object. More...
#include <thread.h>
Inheritance diagram for csCondition:

Public Methods | |
virtual void | Signal (bool WakeAll=false)=0 |
Wake up one or all threads waiting upon a change of condition. | |
virtual bool | Wait (csMutex *, csTicks timeout=0)=0 |
Wait for some change of condition. | |
virtual char const * | GetLastError ()=0 |
Return the last error description, else 0 if there was none. | |
Static Public Methods | |
csRef< csCondition > | Create (uint32 conditionAttributes=0) |
Create a semaphore with specific condition attributes. |
Detailed Description
A condition object.
Definition at line 216 of file thread.h.
Member Function Documentation
|
Create a semaphore with specific condition attributes.
|
|
Return the last error description, else 0 if there was none.
|
|
Wake up one or all threads waiting upon a change of condition. If WakeAll is false, only one waiting thread will be awakened and given access to the associated mutex. If WakeAll is true, all threads waiting on the condition will be awakened and will vie for the associated mutex. Only one thread will win the mutex (thus gaining access to the condition); all other waiting threads will be re-suspended. |
|
Wait for some change of condition. Suspends the calling thread until some other thread invokes Signal() to notify a change of condition. The caller must already hold a lock on the mutex before calling Wait(), and all threads waiting on the condition must be using the same mutex. When called, Wait() releases the caller's lock on the mutex and suspends the caller's thread. Upon return from Wait(), the caller's lock on the mutex is restored. Returns true if the caller was wakened normally. Returns false if the wait timed out. |
The documentation for this class was generated from the following file:
- csutil/thread.h
Generated for Crystal Space by doxygen 1.2.18