|
Open Model Railroad Network (OpenMRN)
|
This class can be given an executor, and will notify itself when that executor is out of work. More...
#include <Executor.hxx>
Public Member Functions | |
| ExecutorGuard (ExecutorBase *e) | |
| Constructor. | |
| long long | timeout () override |
| Implementation of the guard functionality. Called on the executor. | |
Public Member Functions inherited from SyncNotifiable | |
| SyncNotifiable () | |
| Constructor. | |
| void | notify () override |
| Implementation of notification receive. | |
| void | wait_for_notification () |
| Blocks the current thread until the notification is delivered. | |
Private Attributes | |
| ExecutorBase * | executor_ |
| Parent. | |
Private Attributes inherited from QMember | |
| QMember * | next |
| pointer to the next member in the queue | |
Additional Inherited Members | |
Private Types inherited from Timer | |
| enum | { NONE = 0 , RESTART = 1 , DELETE = -1 } |
| Special return values from the timeout function. More... | |
Private Member Functions inherited from Timer | |
| Timer (ActiveTimers *timers) | |
| Constructor. | |
| ~Timer () | |
| Destructor. | |
| void | run () override |
| Callback from the executor when this timer is scheduled. | |
| long long | schedule_time () |
| void | start (long long period=-1) |
| Starts a timer. | |
| void | start_absolute (long long expiry_time_nsec) |
| Starts the timer with an absolute deadline. | |
| void | restart () |
| Restart a timer with the existing period but from the current time. | |
| void | trigger () |
| This will wakeup the timer prematurely, immediately. | |
| void | ensure_triggered () |
| Triggers the timer if it is not expired yet. | |
| void | cancel () |
| Dangerous, do not call. | |
| bool | is_triggered () |
| void | set_triggered () |
| Sets the timer as if it was woken up by a trigger(), even if it was never started. | |
| void | update_period (long long period) |
| Updates the period, to be used after the next expiration of the timer in order to restart it. | |
Private Member Functions inherited from Executable | |
| void | test_deletion () |
| void | notify () override |
| Crashes the program – everyone who is expecting notify calls must override this function. | |
| virtual void | alloc_result (QMember *item) |
| Return the result of an alloc_async() from a memory Pool. | |
Private Member Functions inherited from QMember | |
| void | init () |
| Initiailize a QMember, in place of a public placement construction. | |
| QMember () | |
| Constructor. | |
| ~QMember () | |
| Destructor. | |
This class can be given an executor, and will notify itself when that executor is out of work.
Callers can pend on the sync notifiable to wait for that.
Definition at line 382 of file Executor.hxx.
|
inline |
Constructor.
| e | is the executor to look for being empty. |
Definition at line 386 of file Executor.hxx.
|
inlineoverridevirtual |
Implementation of the guard functionality. Called on the executor.
Implements Timer.
Definition at line 395 of file Executor.hxx.
|
private |
Parent.
Definition at line 406 of file Executor.hxx.