SObjectizer  5.8
Loading...
Searching...
No Matches
so_5::timers_details::actual_thread_t< Timer_Thread > Class Template Reference

An actual implementation of timer thread. More...

Inheritance diagram for so_5::timers_details::actual_thread_t< Timer_Thread >:
so_5::timer_thread_t

Public Member Functions

 actual_thread_t (std::unique_ptr< Timer_Thread > thread)
 Initializing constructor.
 
virtual void start () override
 Launch timer.
 
virtual void finish () override
 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) override
 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) override
 Push anonymous delayed/periodic message to the timer queue.
 
virtual timer_thread_stats_t query_stats () override
 Get statistics for run-time monitoring.
 
- Public Member Functions inherited from so_5::timer_thread_t
 timer_thread_t ()=default
 
virtual ~timer_thread_t ()=default
 

Private Types

using timer_demand_t = actual_timer_t< Timer_Thread >
 

Private Attributes

std::unique_ptr< Timer_Thread > m_thread
 

Detailed Description

template<class Timer_Thread>
class so_5::timers_details::actual_thread_t< Timer_Thread >

An actual implementation of timer thread.

Since
v.5.5.0
Template Parameters
Timer_ThreadA type of timertt-based thread which implements timers.

Definition at line 140 of file timers.cpp.

Member Typedef Documentation

◆ timer_demand_t

template<class Timer_Thread >
using so_5::timers_details::actual_thread_t< Timer_Thread >::timer_demand_t = actual_timer_t< Timer_Thread >
private

Definition at line 142 of file timers.cpp.

Constructor & Destructor Documentation

◆ actual_thread_t()

template<class Timer_Thread >
so_5::timers_details::actual_thread_t< Timer_Thread >::actual_thread_t ( std::unique_ptr< Timer_Thread > thread)
inline

Initializing constructor.

Parameters
threadReal timer thread.

Definition at line 146 of file timers.cpp.

Member Function Documentation

◆ finish()

template<class Timer_Thread >
virtual void so_5::timers_details::actual_thread_t< Timer_Thread >::finish ( )
inlineoverridevirtual

Finish timer and wait for full stop.

Implements so_5::timer_thread_t.

Definition at line 159 of file timers.cpp.

◆ query_stats()

template<class Timer_Thread >
virtual timer_thread_stats_t so_5::timers_details::actual_thread_t< Timer_Thread >::query_stats ( )
inlineoverridevirtual

Get statistics for run-time monitoring.

Since
v.5.5.4

Implements so_5::timer_thread_t.

Definition at line 197 of file timers.cpp.

◆ schedule()

template<class Timer_Thread >
virtual timer_id_t so_5::timers_details::actual_thread_t< Timer_Thread >::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 )
inlineoverridevirtual

Push delayed/periodic message to the timer queue.

A timer can be deactivated later by using returned timer_id.

Parameters
type_indexType of message to be sheduled.
mboxMbox for message delivery.
msgMessage to be sent.
pausePause before first message delivery.
periodPeriod for message repetition. Zero value means single shot delivery.

Implements so_5::timer_thread_t.

Definition at line 165 of file timers.cpp.

◆ schedule_anonymous()

template<class Timer_Thread >
virtual void so_5::timers_details::actual_thread_t< Timer_Thread >::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 )
inlineoverridevirtual

Push anonymous delayed/periodic message to the timer queue.

A timer cannot be deactivated later.

Parameters
type_indexType of message to be sheduled.
mboxMbox for message delivery.
msgMessage to be sent.
pausePause before first message delivery.
periodPeriod for message repetition. Zero value means single shot delivery.

Implements so_5::timer_thread_t.

Definition at line 183 of file timers.cpp.

◆ start()

template<class Timer_Thread >
virtual void so_5::timers_details::actual_thread_t< Timer_Thread >::start ( )
inlineoverridevirtual

Launch timer.

Implements so_5::timer_thread_t.

Definition at line 153 of file timers.cpp.

Member Data Documentation

◆ m_thread

template<class Timer_Thread >
std::unique_ptr< Timer_Thread > so_5::timers_details::actual_thread_t< Timer_Thread >::m_thread
private

Definition at line 208 of file timers.cpp.


The documentation for this class was generated from the following file: