|
SObjectizer
5.8
|
Timer thread interface. More...
#include <timers.hpp>
Public Member Functions | |
| timer_thread_t ()=default | |
| virtual | ~timer_thread_t ()=default |
| virtual void | start ()=0 |
| Launch timer. | |
| virtual void | finish ()=0 |
| Finish timer and wait for full stop. | |
| virtual timer_id_t | schedule (const std::type_index &type_index, const mbox_t &mbox, const message_ref_t &msg, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period)=0 |
| Push delayed/periodic message to the timer queue. | |
| virtual void | schedule_anonymous (const std::type_index &type_index, const mbox_t &mbox, const message_ref_t &msg, std::chrono::steady_clock::duration pause, std::chrono::steady_clock::duration period)=0 |
| Push anonymous delayed/periodic message to the timer queue. | |
| virtual timer_thread_stats_t | query_stats ()=0 |
| Get statistics for run-time monitoring. | |
Private Member Functions | |
| timer_thread_t (const timer_thread_t &)=delete | |
| timer_thread_t & | operator= (const timer_thread_t &)=delete |
Timer thread interface.
All timer threads for SObjectizer must be derived from this class.
A real timer may not be implemented as a thread. The name of this class is just a consequence of some historic reasons.
A timer is started by timer_thread_t::start() method. To stop timer the timer_thread_t::finish() method is used. The finish() method should block caller until all timer resources will be released and all dedicated timer threads (if any) are completelly stopped.
Definition at line 161 of file timers.hpp.
|
privatedelete |
|
default |
|
virtualdefault |
|
pure virtual |
Finish timer and wait for full stop.
Implemented in so_5::timers_details::actual_thread_t< Timer_Thread >.
|
privatedelete |
|
pure virtual |
Get statistics for run-time monitoring.
Implemented in so_5::timers_details::actual_thread_t< Timer_Thread >.
|
pure virtual |
Push delayed/periodic message to the timer queue.
A timer can be deactivated later by using returned timer_id.
| type_index | Type of message to be sheduled. |
| mbox | Mbox for message delivery. |
| msg | Message to be sent. |
| pause | Pause before first message delivery. |
| period | Period for message repetition. Zero value means single shot delivery. |
Implemented in so_5::timers_details::actual_thread_t< Timer_Thread >.
|
pure virtual |
Push anonymous delayed/periodic message to the timer queue.
A timer cannot be deactivated later.
| type_index | Type of message to be sheduled. |
| mbox | Mbox for message delivery. |
| msg | Message to be sent. |
| pause | Pause before first message delivery. |
| period | Period for message repetition. Zero value means single shot delivery. |
Implemented in so_5::timers_details::actual_thread_t< Timer_Thread >.
|
pure virtual |
Launch timer.
Implemented in so_5::timers_details::actual_thread_t< Timer_Thread >.