SObjectizer  5.7
Namespaces | Classes | Functions
so_5::disp::one_thread Namespace Reference

Dispatcher with single working thread. More...

Namespaces

 impl
 Implementation details for dispatcher with single working thread.
 

Classes

class  disp_params_t
 Alias for namespace with traits of event queue. More...
 
class  dispatcher_handle_t
 A handle for one_thread dispatcher. More...
 

Functions

SO_5_FUNC dispatcher_handle_t make_dispatcher ( environment_t &env, const std::string_view data_sources_name_base, disp_params_t params)
 Create an instance of one_thread dispatcher. More...
 
dispatcher_handle_t make_dispatcher (environment_t &env, const std::string_view data_sources_name_base)
 Create an instance of one_thread dispatcher. More...
 
dispatcher_handle_t make_dispatcher (environment_t &env)
 Create an instance of one_thread dispatcher. More...
 

Detailed Description

Dispatcher with single working thread.

Function Documentation

◆ make_dispatcher() [1/3]

dispatcher_handle_t so_5::disp::one_thread::make_dispatcher ( environment_t env,
const std::string_view  data_sources_name_base 
)
inline

Create an instance of one_thread dispatcher.

Usage sample
env,
"file_handler" );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of one_thread dispatcher.
one_thread_disp.binder() );
Since
v.5.6.0
Parameters
envSObjectizer Environment to work in.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.

◆ make_dispatcher() [2/3]

dispatcher_handle_t so_5::disp::one_thread::make_dispatcher ( environment_t env)
inline

Create an instance of one_thread dispatcher.

Usage sample
auto one_thread_disp = so_5::disp::one_thread::make_dispatcher( env );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of one_thread dispatcher.
one_thread_disp.binder() );
Since
v.5.6.0

◆ make_dispatcher() [3/3]

SO_5_FUNC dispatcher_handle_t so_5::disp::one_thread::make_dispatcher ( environment_t env,
const std::string_view  data_sources_name_base,
disp_params_t  params 
)

Create an instance of one_thread dispatcher.

Usage sample
env,
"file_handler",
[]( so_5::disp::one_thread::queue_traits::queue_params_t & p ) {
} ) );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of one_thread dispatcher.
one_thread_disp.binder() );
Since
v.5.6.0
Parameters
envSObjectizer Environment to work in.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.
paramsParameters for the dispatcher.
Examples:
so_5/default_message_limits/main.cpp, so_5/disp/main.cpp, so_5/dispatcher_hello/main.cpp, so_5/hardwork_imit/main.cpp, so_5/machine_control/main.cpp, so_5/named_dispatchers_layer/main.cpp, so_5/news_board/main.cpp, so_5/producer_consumer_mchain/main.cpp, so_5/queue_size_stats/main.cpp, and so_5/selective_msg_tracing/main.cpp.