Extends "abstract template type" TCondition. This implementation constitutes the simplest possible derivate, by
Definition at line 356 of file condition.inl.
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 alib::threads::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 alib::threads::TCondition< Condition > | |
| TCondition (const character *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 320 of file condition.inl.
|
protected |
Boolean member which records notifications. Defaults to not-notified.
Definition at line 363 of file condition.inl.
|
inline |
Defaulted default constructor.
| dbgName | A name for the condition. Only available with debug-compilations. |
Definition at line 381 of file condition.inl.
|
inlineprotected |
In general, derivates of TCondition have to return true if the former reason for blocking a thread is now fulfilled.
Definition at line 369 of file condition.inl.
|
inline |
Wakes up the next sleeping thread.
Definition at line 389 of file condition.inl.
|
inline |
Wakes up all sleeping threads.
Definition at line 399 of file condition.inl.
|
inline |
Waits for notification (for an unlimited time).
Definition at line 409 of file condition.inl.
|
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 479 of file condition.inl.
|
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 460 of file condition.inl.
|
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 432 of file condition.inl.