ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
rppasio::schedulers::strand Class Reference

Asio based scheduler where each worker is assigned an asio strand to execute schedulables with the guarantee that none of those schedulables will execute concurrently. More...

#include <strand.hpp>

Public Member Functions

 strand (asio::io_context::executor_type executor)
 
auto create_worker () const
 

Public Attributes

asio::io_context::executor_type m_executor
 

Detailed Description

Asio based scheduler where each worker is assigned an asio strand to execute schedulables with the guarantee that none of those schedulables will execute concurrently.

This scheduler can efficiently enable multi-threading execution when running provided io_context in multiple threads. Compared to the thread_pool scheduler, a worker is not pinned to a single thread and schedulables are instead dynamically dispatched to potentially different io_context threads depending on load.


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