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

Namespaces

namespace  anonymous_namespace{pub.cpp}
 
namespace  impl
 

Classes

class  bind_params_t
 Parameters for binding agents to nef_thread_pool dispatcher. More...
 
class  disp_params_t
 Alias for namespace with traits of event queue. More...
 
class  dispatcher_handle_t
 A handle for nef_thread_pool 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 disp_params)
 Create an instance nef_thread_pool dispatcher.
 
dispatcher_handle_t make_dispatcher (environment_t &env, const std::string_view data_sources_name_base, std::size_t thread_count)
 Create an instance of nef_thread_pool dispatcher.
 
dispatcher_handle_t make_dispatcher (environment_t &env, std::size_t thread_count)
 Create an instance of nef_thread_pool dispatcher.
 
dispatcher_handle_t make_dispatcher (environment_t &env)
 Create an instance of nef_thread_pool dispatcher with the default count of working threads.
 

Function Documentation

◆ make_dispatcher() [1/4]

SO_5_FUNC dispatcher_handle_t so_5::disp::nef_thread_pool::make_dispatcher ( environment_t & env,
const std::string_view data_sources_name_base,
disp_params_t disp_params )
nodiscard

Create an instance nef_thread_pool dispatcher.

Usage sample
auto disp = make_dispatcher(
env,
"db_workers_pool",
.thread_count( 16 )
.tune_queue_params( []( queue_traits::queue_params_t & params ) {
} ) );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of nef_thread_pool dispatcher.
disp.binder() );
Container for storing parameters for MPSC queue.
queue_params_t & lock_factory(lock_factory_t factory)
Setter for lock factory.
Alias for namespace with traits of event queue.
disp_params_t & thread_count(std::size_t count)
Setter for thread count.
SO_5_FUNC lock_factory_t simple_lock_factory()
Factory for creation of very simple implementation based on usage of mutex and condition_variable onl...
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 nef_thread_pool dispatcher.
Since
v.5.8.0
Parameters
envSObjectizer Environment to work in.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.
disp_paramsParameters for the dispatcher.

Definition at line 423 of file nef_thread_pool/pub.cpp.

◆ make_dispatcher() [2/4]

dispatcher_handle_t so_5::disp::nef_thread_pool::make_dispatcher ( environment_t & env)
inlinenodiscard

Create an instance of nef_thread_pool dispatcher with the default count of working threads.

Count of work threads will be detected by default_thread_pool_size() function.

Usage sample
auto disp = so_5::disp::nef_thread_pool::make_instance( env );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of nef_thread_pool dispatcher.
disp.binder() );
Since
v.5.8.0
Parameters
envSObjectizer Environment to work in.

Definition at line 467 of file nef_thread_pool/pub.hpp.

◆ make_dispatcher() [3/4]

dispatcher_handle_t so_5::disp::nef_thread_pool::make_dispatcher ( environment_t & env,
const std::string_view data_sources_name_base,
std::size_t thread_count )
inlinenodiscard

Create an instance of nef_thread_pool dispatcher.

Usage sample
env,
"db_workers_pool",
16 );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of nef_thread_pool dispatcher.
disp.binder() );
Since
v.5.8.0
Parameters
envSObjectizer Environment to work in.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.
thread_countCount of working threads.

Definition at line 402 of file nef_thread_pool/pub.hpp.

◆ make_dispatcher() [4/4]

dispatcher_handle_t so_5::disp::nef_thread_pool::make_dispatcher ( environment_t & env,
std::size_t thread_count )
inlinenodiscard

Create an instance of nef_thread_pool dispatcher.

Usage sample
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of nef_thread_pool dispatcher.
disp.binder() );
Since
v.5.8.0
Parameters
envSObjectizer Environment to work in.
thread_countCount of working threads.

Definition at line 434 of file nef_thread_pool/pub.hpp.