22#include <flow/async/single_thread_task_loop.hpp>
146 public flow::log::Log_context,
147 private boost::noncopyable
An object of this type, used internally to implement sync_io-pattern objects that require timer event...
boost::asio::readable_pipe Timer_fired_read_end
Object representing the read end of IPC mechanism, where readable status indicates the associated tim...
const std::string m_nickname
Nickname as passed to ctor.
void consume_timer_firing_signal(Timer_fired_read_end *read_end)
Must be called after a timer_async_wait()-triggered timer fired, before invoking that method for the ...
void timer_async_wait(flow::util::Timer *timer, Timer_fired_read_end *read_end)
To be used on a timer T returned by create_timer(), this is the replacement for the usual T....
Timer_event_emitter(flow::log::Logger *logger_ptr, String_view nickname_str)
Constructs emitter, creating idle thread managing no timers.
const std::string & nickname() const
Returns nickname as passed to ctor.
flow::util::Timer create_timer()
Creates idle timer for use with timer_async_wait() subsequently.
boost::unordered_map< Timer_fired_read_end *, boost::movelib::unique_ptr< boost::asio::writable_pipe > > m_signal_pipe_writers
Stores the write-ends of the pipes created in create_timer_signal_pipe(), indexed by pointer to their...
flow::async::Single_thread_task_loop m_worker
The thread where (only) timer-firing events (from create_timer()-created Timers) execute.
Timer_fired_read_end * create_timer_signal_pipe()
Creates, and internally stores, an IPC mechanism instance intended for use with a given create_timer(...
std::vector< boost::movelib::unique_ptr< Timer_fired_read_end > > m_signal_pipe_readers
The readers (never null) returned by create_timer_signal_pipe().
Contains common code, as well as important explanatory documentation in the following text,...
flow::util::String_view String_view
Short-hand for Flow's String_view.