Condition template class. More...
#include <Condition.h>
Public Member Functions | |
Condition (M &mutex) | |
Constructor. | |
~Condition () | |
Destructor. | |
void | signal () |
Resume of the thread practice. | |
void | broadcast () |
Resume of all the thread practice. | |
bool | wait () |
Wait of the thread practice. | |
bool | wait (long second, long nano_second=0) |
Thread practice wait of set time. |
Condition template class.
coil::Condition< M >::Condition | ( | M & | mutex | ) | [inline] |
Constructor.
Constructor
coil::Condition< M >::~Condition | ( | ) | [inline] |
Destructor.
Destructor
void coil::Condition< M >::broadcast | ( | ) | [inline] |
Resume of all the thread practice.
Let all waiting thread practice resume.
void coil::Condition< M >::signal | ( | ) | [inline] |
Resume of the thread practice.
Let the practice of a waiting thread resume.
bool coil::Condition< M >::wait | ( | long | second, | |
long | nano_second = 0 | |||
) | [inline] |
Thread practice wait of set time.
In set time, stop the practice of the thread.
second | Time of the seconds. | |
nano_second | time of the nanoseconds. |
bool coil::Condition< M >::wait | ( | ) | [inline] |
Wait of the thread practice.
Stop the practice of the thread till a condition variable is transmitted.