#include <TCMTCondition.h>
Public Member Functions | |
virtual MutexPtr | GetMutex ()=0 |
Get the mutex used with this condition. | |
virtual bool | Wait ()=0 |
Wait for the condition variable to be signaled. | |
virtual bool | Wait (uint32 timeout)=0 |
Wait for the condition variable to be signaled for specified time. | |
virtual bool | Signal ()=0 |
If one or more threads have called Wait() Signal wakes up at least one of them, possibly more. | |
virtual bool | Broadcast ()=0 |
Broadcast is like Signal but wakes all threads which have called Wait(). | |
virtual | ~Condition () |
The condition variable is linked to the mutex, so that there is an implicit UnLock and Lock around Wait() and TryWait(). The Mutex can be obtained with GetMutex
Definition at line 65 of file TCMTCondition.h.
virtual TC::MT::Condition::~Condition | ( | ) | [inline, virtual] |
Definition at line 103 of file TCMTCondition.h.
virtual MutexPtr TC::MT::Condition::GetMutex | ( | ) | [pure virtual] |
Get the mutex used with this condition.
virtual bool TC::MT::Condition::Wait | ( | ) | [pure virtual] |
Wait for the condition variable to be signaled.
The mutex is implicitly released before waiting and locked again after waking up. If Wait() is called by multiple threads, a signal may wake up more than one thread. See POSIX threads documentation for details.
virtual bool TC::MT::Condition::Wait | ( | uint32 | timeout | ) | [pure virtual] |
Wait for the condition variable to be signaled for specified time.
timeout | Time to wait in milliseconds |
virtual bool TC::MT::Condition::Signal | ( | ) | [pure virtual] |
If one or more threads have called Wait() Signal wakes up at least one of them, possibly more.
See POSIX threads documentation for details.
virtual bool TC::MT::Condition::Broadcast | ( | ) | [pure virtual] |
Broadcast is like Signal but wakes all threads which have called Wait().