Extends "abstract template type" TCondition. This implementation constitutes the simplest possible derivate, by
Definition at line 468 of file condition.hpp.
#include <condition.hpp>
Public Method Index: | |
Condition (const character *dbgName) | |
void | Notify (ALIB_DBG_TAKE_CI) |
void | NotifyAll (ALIB_DBG_TAKE_CI) |
void | Wait (ALIB_DBG_TAKE_CI) |
void | Wait (const Ticks &wakeUpTime, const CallerInfo &ci) |
void | Wait (const Ticks::Duration &maxWaitTimeSpan, const CallerInfo &ci) |
void | Wait (const Ticks::Duration::TDuration &maxWaitTimeSpan, const CallerInfo &ci) |
Protected Field Index: | |
bool | notified = false |
Boolean member which records notifications. Defaults to not-notified. | |
Protected Field Index: inherited from TCondition< Condition > | |
std::condition_variable | conditionVariable |
The condition variable used for blocking and notification. | |
DbgConditionAsserter | Dbg |
The debug tool instance. | |
std::mutex | mutex |
The mutex used for locking this instance. | |
Protected Method Index: | |
bool | isConditionMet () |
Protected Method Index: inherited from TCondition< Condition > | |
TCondition (const String &dbgName) | |
void | Acquire (ALIB_DBG_TAKE_CI) |
Condition & | cast () |
void | Release (ALIB_DBG_TAKE_CI) |
void | ReleaseAndNotify (ALIB_DBG_TAKE_CI) |
void | ReleaseAndNotifyAll (ALIB_DBG_TAKE_CI) |
void | WaitForNotification (ALIB_DBG_TAKE_CI) |
void | WaitForNotification (const Ticks &wakeUpTime, const CallerInfo &ci) |
void | WaitForNotification (const Ticks::Duration &maxWaitTimeSpan, const CallerInfo &ci) |
void | WaitForNotification (const Ticks::Duration::TDuration &maxWaitTimeSpan, const CallerInfo &ci) |
|
friend |
the parent type needs to be able to call protected method isConditionMet.
Definition at line 432 of file condition.hpp.
|
protected |
Boolean member which records notifications. Defaults to not-notified.
Definition at line 475 of file condition.hpp.
Defaulted default constructor.
dbgName | A name for the condition. Only available with debug-compilations. |
Definition at line 493 of file condition.hpp.
|
inlineprotected |
In general, derivates of TCondition have to return true
if the former reason for blocking a thread is now fulfilled.
Definition at line 481 of file condition.hpp.
|
inline |
Wakes up the next sleeping thread.
Definition at line 501 of file condition.hpp.
|
inline |
Wakes up all sleeping threads.
Definition at line 511 of file condition.hpp.
|
inline |
Waits for notification (for an unlimited time).
Definition at line 521 of file condition.hpp.
|
inline |
Waits for notification, but only until a given point in time.
Before invoking this method, this object has to be acquired. After the wake-up call, the internal mutex is (again) acquired and thus has to be released later.
wakeUpTime | The point in time to wake up, even if not notified. |
ci | Caller information. Use macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 591 of file condition.hpp.
|
inline |
Waits for notification but only for a given duration.
Before invoking this method, this object has to be acquired. After the wake-up call, the internal mutex is (again) acquired and thus has to be released later.
maxWaitTimeSpan | The maximum time to wait. |
ci | Caller information. Use macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 572 of file condition.hpp.
|
inline |
Same as Wait(const Ticks::Duration&, const CallerInfo&), but takes a C++ time span.
maxWaitTimeSpan | The maximum time to wait. |
ci | Caller information. Use macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 544 of file condition.hpp.