A function for creation an instance of asio_one_thread dispatcher.
Usage examples:
asio_disp::disp_params_t params;
params.use_own_io_context();
auto disp = asio_disp::make_dispatcher(
env,
"my_asio_disp",
std::move(disp_params) );
asio::io_context & io_svc = ...;
asio_disp::disp_params_t params;
params.use_external_io_context( io_svc );
auto disp = asio_disp::make_dispatcher(
env,
"my_asio_disp",
std::move(disp_params) );
- Requirements for traits type
- The Traits-type is empty in v.1.5.0. There was a possibitily to specify a custom thread type in previous versions of so_5_extra, but since v.1.5.0 custom threads are supported via standard SObjectizer's mechanism based on
abstract_work_thread_t
/abstract_work_thread_factory_t
interfaces. But the Traits-type might be extended by some content in future versions.
- Template Parameters
-
Traits | Type with traits for a dispatcher. For the requirements for Traits type see the section "Requirements for traits type" above. |
- Since
- v.1.4.1
- Parameters
-
env | SObjectizer environment to work in. |
data_sources_name_base | Short name for this instance to be used in thread activity stats. Can be empty string. In this case name will be generated automatically. |
params | Parameters for this dispatcher instance. |
Definition at line 908 of file pub.hpp.