A condition variable to allow synchronization between threads. More...
#include <Cond.h>
Public Member Functions | |
virtual | ~ICond () |
Destructor. | |
virtual void | wait (IMutex *mutex)=0 |
The calling thread will wait until the condition variable is signaled by another thread. More... | |
virtual void | signal ()=0 |
Resumes at least one single thread that is waiting for the condition. More... | |
virtual void | broadcast ()=0 |
Resumes all threads that are waiting for the condition. More... | |
virtual void * | handle ()=0 |
Returns the platform dependent handle associated to this object. | |
Static Public Member Functions | |
static ICond * | create () |
Creates one new condition variable. | |
A condition variable to allow synchronization between threads.
Condition variables are synchronization primitives to allow threads to wait until a particular condition occurs.
|
pure virtual |
Resumes all threads that are waiting for the condition.
Calling the method without no threads waiting for signals have no effect.
|
pure virtual |
Resumes at least one single thread that is waiting for the condition.
Calling the method without no threads waiting for signals have no effect.
|
pure virtual |
The calling thread will wait until the condition variable is signaled by another thread.
This method atomically performs this steps:
mutex | The mutex to be unlocked/locked. |