HDK
|
Condition synchronization primitive. More...
#include <UT_Condition.h>
Public Member Functions | |
UT_Condition () | |
~UT_Condition () | |
template<typename Predicate > | |
void | wait (UT_Lock &lock, const Predicate &pred) |
void | waitForTrigger (UT_Lock &lock) |
bool | waitForTriggerMS (UT_Lock &lock, int64 timeout_msec) |
void | triggerAll () |
void | triggerOne () |
UT_Condition (const UT_Condition ©)=delete | |
UT_Condition & | operator= (const UT_Condition ©)=delete |
Condition synchronization primitive.
Definition at line 25 of file UT_Condition.h.
UT_Condition::UT_Condition | ( | ) |
UT_Condition::~UT_Condition | ( | ) |
|
delete |
|
delete |
void UT_Condition::triggerAll | ( | ) |
Trigger all waiting threads.
void UT_Condition::triggerOne | ( | ) |
Trigger one waiting thread.
|
inline |
Block until we're triggered.
The lock must be held when this method is called. Will return when the predicate evaluates to true, with the lock acquired. Internally will release the lock and wait for triggers before retesting the predicate.
Definition at line 38 of file UT_Condition.h.
The lock must be held when this method is called it will be released when waiting for the trigger and re-acquired when this method returns.
Wait with a timeout, returns true if the lock was re-acquired. False means a timeout occurred.