#include <QThread.h>
This wait condition object functions very similarly to an event object in OS/2 or Win32. Essentially, this type of object acts like a soft drink dispenser - it holds the cans (threads) in a FIFO stack from which inseting a coin (wakeOne()) takes the bottom one out and dispenses it. You can also dispense all the cans at once (wakeAll()) which permits any new cans entered in the top to be dispensed straight away until reset() is called.
To use OS/2 speak, this object is signalled when it permits any thread trying to wait on to continue straight away. This continues until the object is reset to unsignalled, whereupon any waits will halt either indefinitely or the timeout period specified.
Unlike OS/2 or Win32, you are not guaranteed that the first thread to wait on the object will be the first thread released with wakeOne(). Due to POSIX limitations, the actual thread released will be random.
Definition at line 385 of file QThread.h.
Public Member Functions | |
QWaitCondition (bool autoreset=false, bool initialstate=false) | |
~QWaitCondition () | |
bool | wait (FXuint time=FXINFINITE) |
void | wakeOne () |
void | wakeAll () |
void | reset () |
bool | signalled () const |