Flow 1.0.2
Flow project: Public API.
Namespaces | Typedefs | Functions
sched_task_fwd.hpp File Reference

Namespaces

namespace  flow
 Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel.
 
namespace  flow::util
 Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module.
 

Typedefs

using flow::util::Scheduled_task_handle = boost::shared_ptr< Scheduled_task_handle_state >
 Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or schedule_task_from_now() or similar, which can be (optionally) used to control the scheduled task after it has been thus scheduled. More...
 
using flow::util::Scheduled_task_const_handle = boost::shared_ptr< const Scheduled_task_handle_state >
 Equivalent to Scheduled_task_handle but refers to immutable version of a task. More...
 
using flow::util::Scheduled_task = Function< void(bool short_fire)>
 Short-hand for tasks that can be scheduled/fired by schedule_task_from_now() and similar. More...
 

Functions

template<typename Scheduled_task_handler >
Scheduled_task_handle flow::util::schedule_task_from_now (log::Logger *logger_ptr, const Fine_duration &from_now, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
 Schedule the given function to execute in a certain amount of time: A handy wrapper around Timer (asio's timer facility). More...
 
template<typename Scheduled_task_handler >
Scheduled_task_handle flow::util::schedule_task_at (log::Logger *logger_ptr, const Fine_time_pt &at, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
 Identical to schedule_task_from_now() except the time is specified in absolute terms. More...
 
bool flow::util::scheduled_task_short_fire (log::Logger *logger_ptr, Scheduled_task_handle task)
 Attempts to reschedule a previously scheduled (by schedule_task_from_now() or similar) task to fire immediately. More...
 
bool flow::util::scheduled_task_cancel (log::Logger *logger_ptr, Scheduled_task_handle task)
 Attempts to prevent the execution of a previously scheduled (by schedule_task_from_now() or similar) task. More...
 
Fine_duration flow::util::scheduled_task_fires_from_now_or_canceled (log::Logger *logger_ptr, Scheduled_task_const_handle task)
 Returns how long remains until a previously scheduled (by schedule_task_from_now() or similar) task fires; or negative time if that point is in the past; or special value if the task has been canceled. More...
 
bool flow::util::scheduled_task_fired (log::Logger *logger_ptr, Scheduled_task_const_handle task)
 Returns whether a previously scheduled (by schedule_task_from_now() or similar) task has already fired. More...
 
bool flow::util::scheduled_task_canceled (log::Logger *logger_ptr, Scheduled_task_const_handle task)
 Returns whether a previously scheduled (by schedule_task_from_now() or similar) task has been canceled. More...