SObjectizer
5.5
|
Reusable components for dispatchers. More...
Namespaces | |
locks | |
Implementation of various types of locks to be used inside dispatchers. | |
thread_pool_stats | |
Helper tools for implementation of run-time monitoring for thread-pool-like dispatchers. | |
work_thread | |
Implemetation details of dispatcher's working thread. | |
Classes | |
class | binder_for_private_disp_template_t |
A template of binder for a private dispatcher. More... | |
class | binder_for_public_disp_template_t |
A template of binder for a named dispatcher. More... | |
class | mpmc_ptr_queue_t |
Multi-producer/Multi-consumer queue of pointers. More... | |
class | proxy_dispatcher_template_t |
A helper template for simplification of implementation of proxy dispatchers. More... | |
class | work_thread_activity_tracking_flag_mixin_t |
Mixin with thread activity tracking flag. More... | |
Functions | |
so_5::stats::prefix_t | make_disp_prefix (const char *disp_type, const std::string data_sources_name_base, const void *disp_this_pointer) |
Create basic prefix for dispatcher data source names. More... | |
so_5::stats::prefix_t | make_disp_working_thread_prefix (const so_5::stats::prefix_t &disp_prefix, std::size_t thread_number) |
Create prefix for dispatcher's working thread data source. More... | |
template<class Dispatcher , class Action > | |
auto | do_with_dispatcher_of_type (dispatcher_t *disp_pointer, const std::string &disp_name, Action action) -> decltype(action(*static_cast< Dispatcher *>(nullptr))) |
A helper method for casing dispatcher to the specified type and performing some action with it. More... | |
template<class Dispatcher , class Action > | |
auto | do_with_dispatcher (environment_t &env, const std::string &disp_name, Action action) -> decltype(action(*static_cast< Dispatcher *>(nullptr))) |
A helper method for extracting dispatcher by name, checking its type and to some action. More... | |
Reusable components for dispatchers.
This namespace contains classes and functions which can be reused by various types of dispatchers.
auto so_5::disp::reuse::do_with_dispatcher | ( | environment_t & | env, |
const std::string & | disp_name, | ||
Action | action | ||
) | -> decltype(action(*static_cast<Dispatcher *>(nullptr))) |
A helper method for extracting dispatcher by name, checking its type and to some action.
auto so_5::disp::reuse::do_with_dispatcher_of_type | ( | dispatcher_t * | disp_pointer, |
const std::string & | disp_name, | ||
Action | action | ||
) | -> decltype(action(*static_cast<Dispatcher *>(nullptr))) |
A helper method for casing dispatcher to the specified type and performing some action with it.
|
inline |
Create basic prefix for dispatcher data source names.
disp_type | Textual marker of dispatcher type (like ot, ao, ag, tp, atp, ...). |
data_sources_name_base | User-supplied optional base for name. Can be empty. |
disp_this_pointer | Pointer to dispatcher instance. Will be used if data_sources_name_base is empty. |
|
inline |
Create prefix for dispatcher's working thread data source.
disp_prefix | Prefix for the dispatcher. |
thread_number | Thread ordinal number. |