SObjectizer 5.8
Loading...
Searching...
No Matches
so_5::disp::one_thread Namespace Reference

Dispatcher with single working thread. More...

Namespaces

namespace  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.
 
dispatcher_handle_t make_dispatcher (environment_t &env, const std::string_view data_sources_name_base)
 Create an instance of one_thread dispatcher.
 
dispatcher_handle_t make_dispatcher (environment_t &env)
 Create an instance of one_thread dispatcher.
 

Detailed Description

Dispatcher with single working thread.

Function Documentation

◆ make_dispatcher() [1/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 ) {
p.lock_factory( so_5::disp::one_thread::queue_traits::simple_lock_factory();
} ) );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of one_thread dispatcher.
one_thread_disp.binder() );
Alias for namespace with traits of event queue.
disp_params_t & tune_queue_params(L tunner)
Tuner for queue parameters.
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.
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/individual_msg_tracing/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.

Definition at line 251 of file one_thread/pub.cpp.

◆ 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

Definition at line 165 of file one_thread/pub.hpp.

◆ make_dispatcher() [3/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.

Definition at line 138 of file one_thread/pub.hpp.