TConditionVariableMutex = class(TSynchroObject)
class PASCALIMPLEMENTATION TConditionVariableMutex : public TSynchroObject
TConditionVariableMutex allows the use of condition variables in combination with mutexes.
Use TConditionVariableMutex in multi-threaded applications in which a thread is required to release a mutex until a specified condition becomes true. During this waiting period, other threads are able to run and are supposed to notify the sleeping thread when the condition becomes true.
When the condition variable is awakened, the mutex is automatically reacquired.
To create a condition variable, simply instantiate the TConditionVariableMutex class. Then, in the executing code of each thread, use a combination of WaitFor and the Release or ReleaseAll methods in order to achieve the communication between threads.