A condition variable, usually used to communicate information about changing state to a thread that is waiting for something to happen.
More...
A condition variable, usually used to communicate information about changing state to a thread that is waiting for something to happen.
A condition variable can be used to "wake up" a thread when some arbitrary condition has changed.
A condition variable is associated with a single mutex, and several condition variables may share the same mutex.
Definition at line 36 of file conditionVarFullDirect.h.
| void ConditionVarFullDirect::notify |
( |
| ) |
[inline] |
Informs one of the other threads who are currently blocked on wait() that the relevant condition has changed.
If multiple threads are currently waiting, at least one of them will be woken up, although there is no way to predict which one. It is possible that more than one thread will be woken up.
The caller must be holding the mutex associated with the condition variable before making this call, which will not release the mutex.
If no threads are waiting, this is a no-op: the notify is lost.
Definition at line 142 of file conditionVarFullDirect.I.
Referenced by DatagramQueue::insert().
| void ConditionVarFullDirect::notify_all |
( |
| ) |
[inline] |
Informs all of the other threads who are currently blocked on wait() that the relevant condition has changed.
The caller must be holding the mutex associated with the condition variable before making this call, which will not release the mutex.
If no threads are waiting, this is a no-op: the notify event is lost.
Definition at line 162 of file conditionVarFullDirect.I.
Referenced by AsyncTaskChain::do_add(), AsyncTaskChain::do_poll(), AsyncTaskChain::do_stop_threads(), Texture::do_unlock_and_reload_ram_image(), DatagramQueue::extract(), AnimControl::fail_anim(), AsyncTaskChain::finish_sort_group(), AsyncTaskManager::poll(), AsyncTaskChain::service_one_task(), AnimControl::setup_anim(), and DatagramQueue::shutdown().
| void ConditionVarFullDirect::wait |
( |
| ) |
[inline] |
| void ConditionVarFullDirect::wait |
( |
double |
timeout | ) |
[inline] |
Waits on the condition, with a timeout.
The function will return when the condition variable is notified, or the timeout occurs. There is no way to directly tell which happened, and it is possible that neither in fact happened (spurious wakeups are possible).
See wait() with no parameters for more.
Definition at line 119 of file conditionVarFullDirect.I.