#include <Threads.h>
Inheritance diagram for H3D::ConditionLock:

Public Member Functions | |
| ConditionLock () | |
| Constructor. | |
| ~ConditionLock () | |
| Destructor. | |
| void | wait () |
| Wait for the conditional to get a signal. | |
| bool | timedWait (unsigned int ms) |
| Wait for the conditional to get a signal, but only wait a certain time. | |
| void | signal () |
| Wakes up at least one thread blocked on this condition lock. | |
| void | broadcast () |
| This wakes up all of the threads blocked on the condition lock. | |
Protected Attributes | |
| pthread_cond_t | cond |
Thread 1 l.lock() l.wait() - lock will be released and the thread will wait for a signal from another thread before continuing. When it continues the lock is aquired again. l.unlock()
Thread 2 l.lock() do some stuff l.signal() - wake the waiting thread l.unlock()
|
|
Wait for the conditional to get a signal, but only wait a certain time. If the time exceeds the specified time false is returned. If signal is received true is returned. |
|
|
Wait for the conditional to get a signal. The lock will be released while waiting and reaquired when a signal is received. |
1.4.5