#include <Pt/System/Condition.h>
Signal and wait synchronisation promitive.
Inherits NonCopyable.
Public Member Functions | |
| Condition () | |
| Default Constructor. | |
| ~Condition () | |
| Destructor. | |
| void | wait (MutexLock &m) |
| Wait until condition becomes signaled. More... | |
| bool | wait (MutexLock &m, unsigned int ms) |
| Wait until condition becomes signalled. More... | |
| void | signal () |
| Unblock a single blocked thread. | |
| void | broadcast () |
| Unblock all blocked threads. | |
| void wait | ( | MutexLock & | m | ) |
Causes the caller to be suspended until the condition will be signaled. The given mutex will be unlocked before the caller is suspended.
| bool wait | ( | MutexLock & | m, |
| unsigned int | ms | ||
| ) |
Causes the caller to be suspended until the condition will be signaled. The given mutex will be unlocked before the caller is suspended. The suspension takes at maximum ms milliseconds. Returns true if successful, false if a timeout occurred.