24#include <boost/move/unique_ptr.hpp>
25#include <boost/utility.hpp>
43 private boost::noncopyable
uint64_t id_t
Raw integer type to uniquely identify a thing. 64-bit width should make overflow extremely hard to re...
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
boost::asio::basic_waitable_timer< Fine_clock > Timer
boost.asio timer.
Internal-use data store used by schedule[d]_task_*(), each object containing the state relevant to a ...
bool m_canceled
Flag indicating whether or not the following is true: From this point on, m_body will absolutely not ...
boost::movelib::unique_ptr< Mutex_non_recursive > m_mutex_unless_single_threaded
Mutex protecting m_fired, m_canceled, and m_timer from the moment m_timer.async_wait() is called.
Timer m_timer
The underlying timer object – paired with m_task_engine – used to actually wait in the background and...
bool m_fired
Flag indicating whether or not the following is true: A wrapper task around m_body is about to fire v...
const Scheduled_task m_body
The function to execute when (and if) the timer fires, or short-fires.
Task_engine *const m_task_engine
Pointer to the task-executing engine (Task_engine) onto which to post tasks, including (if applicable...
Scheduled_task_handle_state(Unique_id_holder::id_t id, bool single_threaded, Task_engine *task_engine, Scheduled_task &&body_moved)
Constructs it to the initial state, wherein it has neither fired nor been canceled.
const Unique_id_holder::id_t m_id
Unique ID for logging.