Class cubthread::worker_pool_impl¶
template <bool Stats>
ClassList > cubthread > worker_pool_impl
#include <thread_worker_pool_impl.hpp>
Inherits the following classes: cubthread::worker_pool
Classes¶
| Type | Name |
|---|---|
| class | core_impl |
| class | stats |
| class | stats_base |
| class | wrapped_task |
Public Types inherited from cubthread::worker_pool¶
| Type | Name |
|---|---|
| typedef entry | context_type |
| typedef task< context_type > | task_type |
Public Functions¶
| Type | Name |
|---|---|
| void | er_log_stats (void) const |
| virtual void | execute (task_type * work_arg) override |
| virtual void | execute_on_core (task_type * work_arg, std::size_t core_hash, bool is_temp=false) override |
| virtual std::size_t | get_core_count (void) override const |
| bool | get_pool_threads () const |
| virtual void | get_stats (cubperf::stat_value * stats_out) override const |
| virtual std::size_t | get_worker_count (void) override const |
| virtual void | initialize (std::size_t worker_count, std::size_t core_count) override |
| virtual bool | is_running (void) override const |
| void | map_cores (Func && func, Args &&... args) |
| void | map_running_contexts (Func && func, Args &&... args) |
| virtual void | stop_execution (void) override |
| virtual void | warmup (void) override |
| virtual | ~worker_pool_impl () |
Public Functions inherited from cubthread::worker_pool¶
| Type | Name |
|---|---|
| virtual void | execute (task_type * work_arg) = 0 |
| virtual void | execute_on_core (task_type * work_arg, std::size_t core_hash, bool is_temp=false) = 0 |
| virtual std::size_t | get_core_count (void) const = 0 |
| entry_manager & | get_entry_manager (void) const |
| const wait_seconds & | get_idle_timeout () const |
| const std::string & | get_name (void) const |
| virtual void | get_stats (cubperf::stat_value * stats_out) const = 0 |
| virtual std::size_t | get_worker_count (void) const = 0 |
| virtual void | initialize (std::size_t worker_count, std::size_t core_count) = 0 |
| virtual bool | is_running (void) const = 0 |
| virtual void | stop_execution (void) = 0 |
| virtual void | warmup (void) = 0 |
| virtual | ~worker_pool () = default |
Protected Attributes¶
| Type | Name |
|---|---|
| std::vector< std::unique_ptr< core > > | m_cores |
| std::size_t | m_max_workers |
| std::atomic< std::size_t > | m_round_robin_counter |
| std::atomic< bool > | m_stopped |
Protected Attributes inherited from cubthread::worker_pool¶
| Type | Name |
|---|---|
| entry_manager & | m_entry_manager |
| wait_seconds | m_idle_timeout |
| std::string | m_name |
| bool | m_pool_threads |
Protected Functions¶
| Type | Name |
|---|---|
| virtual std::unique_ptr< core > | allocate_core (bool pool_threads) |
| virtual void | allocate_cores (std::size_t core_count) |
| virtual void | assign_workers_to_cores (std::size_t worker_count) |
| virtual std::size_t | get_next_core (void) |
| std::size_t | get_round_robin_core_hash (void) |
| worker_pool_impl (std::size_t pool_size, std::size_t core_count, const char * name, entry_manager & entry_mgr, bool pool_threads=false, wait_seconds idle_timeout=std::chrono::seconds(5)) |
Protected Functions inherited from cubthread::worker_pool¶
| Type | Name |
|---|---|
| worker_pool (const char * name, entry_manager & entry_mgr, bool pool_threads, wait_seconds idle_timeout) |
Public Functions Documentation¶
function er_log_stats¶
function execute¶
Implements cubthread::worker_pool::execute
function execute_on_core¶
virtual void cubthread::worker_pool_impl::execute_on_core (
task_type * work_arg,
std::size_t core_hash,
bool is_temp=false
) override
Implements cubthread::worker_pool::execute_on_core
function get_core_count¶
Implements cubthread::worker_pool::get_core_count
function get_pool_threads¶
function get_stats¶
virtual void cubthread::worker_pool_impl::get_stats (
cubperf::stat_value * stats_out
) override const
Implements cubthread::worker_pool::get_stats
function get_worker_count¶
Implements cubthread::worker_pool::get_worker_count
function initialize¶
virtual void cubthread::worker_pool_impl::initialize (
std::size_t worker_count,
std::size_t core_count
) override
Implements cubthread::worker_pool::initialize
function is_running¶
Implements cubthread::worker_pool::is_running
function map_cores¶
template<typename Func, typename ... Args>
void cubthread::worker_pool_impl::map_cores (
Func && func,
Args &&... args
)
function map_running_contexts¶
template<typename Func, typename ... Args>
void cubthread::worker_pool_impl::map_running_contexts (
Func && func,
Args &&... args
)
function stop_execution¶
Implements cubthread::worker_pool::stop_execution
function warmup¶
Implements cubthread::worker_pool::warmup
function ~worker_pool_impl¶
Protected Attributes Documentation¶
variable m_cores¶
variable m_max_workers¶
variable m_round_robin_counter¶
variable m_stopped¶
Protected Functions Documentation¶
function allocate_core¶
function allocate_cores¶
function assign_workers_to_cores¶
function get_next_core¶
function get_round_robin_core_hash¶
function worker_pool_impl¶
cubthread::worker_pool_impl::worker_pool_impl (
std::size_t pool_size,
std::size_t core_count,
const char * name,
entry_manager & entry_mgr,
bool pool_threads=false,
wait_seconds idle_timeout=std::chrono::seconds(5)
)
Friends Documentation¶
friend manager¶
The documentation for this class was generated from the following file cubrid/src/thread/thread_worker_pool_impl.hpp