Extends "abstract template type" TCondition. This implementation constitutes the simplest possible derivate, by
Definition at line 340 of file condition.inl.
Public Method Index: | |
| Event (const character *dbgName) | |
| void | Reset (ALIB_DBG_TAKE_CI) |
| void | ResetAndWait (ALIB_DBG_TAKE_CI) |
| void | ResetAndWait (const Ticks &wakeUpTime, const CallerInfo &ci) |
| void | ResetAndWait (const Ticks::Duration &maxWaitTimeSpan, const CallerInfo &ci) |
| void | ResetAndWait (const Ticks::Duration::TDuration &maxWaitTimeSpan, const CallerInfo &ci) |
| void | Set (ALIB_DBG_TAKE_CI) |
| void | SetAll (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< Event > | |
| 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< Event > | |
| TCondition (const character *dbgName) | |
| void | Acquire (ALIB_DBG_TAKE_CI) |
| Event & | 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) |
|
protected |
Boolean member which records notifications. Defaults to not-notified.
Definition at line 349 of file condition.inl.
|
inline |
Defaulted default constructor.
| dbgName | A name for the condition. Only available with debug-compilations. |
Definition at line 367 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 355 of file condition.inl.
|
inline |
Resets the condition (flag becomes false). No notification is sent.
Definition at line 393 of file condition.inl.
|
inline |
Clears the condition first and then waits (for an unlimited time). This provides edge-triggered semantics comparable to the previous implementation of Wait.
Definition at line 418 of file condition.inl.
|
inline |
Clears the condition first and then waits until a given point in time.
| wakeUpTime | The point in time to wake up, even if not notified. |
| ci | Caller information. Use the macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 515 of file condition.inl.
|
inline |
Clears the condition first and then waits for up to a given duration.
| maxWaitTimeSpan | The maximum time to wait. |
| ci | Caller information. Use the macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 483 of file condition.inl.
|
inline |
Clears the condition first and then waits for up to a given duration.
| maxWaitTimeSpan | The maximum time to wait. |
| ci | Caller information. Use the macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 447 of file condition.inl.
|
inline |
Sets the condition (flag becomes true) and wakes up the next sleeping thread.
Definition at line 375 of file condition.inl.
|
inline |
Sets the condition (flag becomes true) and wakes up all sleeping threads.
Definition at line 384 of file condition.inl.
|
inline |
Waits until the condition is set (for an unlimited time). This method does not modify the condition state.
Definition at line 403 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 the macro ALIB_COMMA_CALLER_PRUNED with invocations. Waits until the condition is set, but only until a given point in time. This method does not modify the condition state. |
Definition at line 505 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 the macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 476 of file condition.inl.
|
inline |
Same as Wait(const Ticks::Duration&, const CallerInfo&), but only up to a given duration. This method does not modify the condition state.
| maxWaitTimeSpan | The maximum time to wait. |
| ci | Caller information. Use the macro ALIB_COMMA_CALLER_PRUNED with invocations. |
Definition at line 437 of file condition.inl.