24#include <boost/any.hpp>
80class Cross_thread_task_loop;
81class Concurrent_task_loop;
83class Segregated_thread_task_loop;
84class Single_thread_task_loop;
85class Timed_single_thread_task_loop;
86class Timed_concurrent_task_loop;
87template<
typename Time_accumulator>
88class Timed_concurrent_task_loop_impl;
153using Op = boost::any;
384template<
typename Execution_context>
412 bool est_hw_core_sharing_helps_algo);
450 const std::vector<util::Thread*>& threads_in_pool,
451 bool est_hw_core_sharing_helps_algo,
452 bool est_hw_core_pinning_helps_algo,
453 bool hw_threads_is_grouping_collated);
480template<
typename Handler>
507template<
typename Exec_ctx_ptr>
The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
Exec_ctx_ptr op_to_exec_ctx(Concurrent_task_loop *loop, const Op &op)
Template specialization model for operation that obtains the underlying execution context,...
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...
boost::any Op
An object of this opaque type represents a collection of 1 or more async::Task, past or future,...
void optimize_pinning_in_thread_pool(flow::log::Logger *logger_ptr, const std::vector< util::Thread * > &threads_in_pool, bool est_hw_core_sharing_helps_algo, bool est_hw_core_pinning_helps_algo, bool hw_threads_is_grouping_collated)
Assuming the same situation as documented for optimal_worker_thread_count_per_pool(),...
Synchronicity
Enumeration indicating the manner in which asio_exec_ctx_post(), and various boost....
@ S_ASYNC
Simply post the given task to execute asynchronously in some execution context – as soon as the conte...
@ S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION
Same as Synchronicity::S_ASYNC but the posting routine then waits as long as necessary for the given ...
@ S_ASYNC_AND_AWAIT_CONCURRENT_START
Same as Synchronicity::S_ASYNC but the posting routine then waits as long as necessary for the given ...
@ S_OPPORTUNISTIC_SYNC_ELSE_ASYNC
Execute the given task synchronously, if the scheduler determines that the calling thread is in its t...
void asio_exec_ctx_post(log::Logger *logger_ptr, Execution_context *exec_ctx, Synchronicity synchronicity, Task &&task)
An extension of boost.asio's post() and dispatch() free function templates, this free function templa...
boost::shared_ptr< util::Strand > Strand_ptr
Short-hand for ref-counted pointer to util::Strand.
Strand_ptr op_to_exec_ctx< Strand_ptr >(Concurrent_task_loop *loop, const Op &op)
Template specialization for operation that obtains the underlying execution context,...
boost::shared_ptr< util::Task_engine > Task_engine_ptr
Short-hand for reference-counting pointer to a mutable util::Task_engine (a/k/a boost::asio::io_servi...
unsigned int optimal_worker_thread_count_per_pool(flow::log::Logger *logger_ptr, bool est_hw_core_sharing_helps_algo)
Assuming a planned thread pool will be receiving ~symmetrical load, and its UX-affecting (in particul...
Task_engine_ptr op_to_exec_ctx< Task_engine_ptr >(Concurrent_task_loop *loop, const Op &op)
Template specialization for operation that obtains the underlying execution context,...
Function< void()> Task
Short-hand for a task that can be posted for execution by a Concurrent_task_loop or flow::util::Task_...
auto asio_handler_via_op(Concurrent_task_loop *loop, const Op &op, Handler &&handler)
Given a boost.asio completion handler handler for a boost.asio async_*() action on some boost....
Function< void(bool short_fire)> Scheduled_task
Short-hand for tasks that can be scheduled/fired by schedule_task_from_now() and similar.
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...