Skip to content

Class cubthread::worker_pool_impl::core_impl

ClassList > cubthread > worker_pool_impl > core_impl

  • #include <thread_worker_pool_impl.hpp>

Inherits the following classes: cubthread::worker_pool::core

Classes

Type Name
class worker_impl

Public Functions

Type Name
void become_available (worker & worker_arg)
void check_worker_not_available (const worker & worker_arg)
virtual void execute_task (task_type * task_p, bool is_temp) override
void free_all_temp_list ()
virtual void get_stats (cubperf::stat_value * stats_out) override const
std::optional< wrapped_task > get_task_or_become_available (worker & worker_arg)
virtual std::size_t get_worker_count (void) override const
virtual void initialize (std::size_t worker_count) override
void map_running_contexts (bool & stop, Func && func, Args &&... args) const
void register_free_temp_list (worker * w)
void retire_queued_tasks (void)
virtual bool stop_execution (void) override
virtual void warmup (void) override
virtual ~core_impl (void)

Public Functions inherited from cubthread::worker_pool::core

See cubthread::worker_pool::core

Type Name
virtual void execute_task (task_type * task_p, bool is_temp) = 0
entry_manager & get_entry_manager (void) const
worker_pool * get_parent_pool (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) = 0
void set_parent_pool (worker_pool & parent)
virtual bool stop_execution (void) = 0
virtual void warmup (void) = 0
virtual ~core (void) = default

Protected Attributes

Type Name
std::vector< worker * > m_available_workers
std::vector< std::unique_ptr< worker > > m_free_temp_workers
std::queue< wrapped_task > m_task_queue
std::vector< std::unique_ptr< worker > > m_temp_workers
std::mutex m_temp_workers_mutex
std::vector< std::unique_ptr< worker > > m_workers
std::mutex m_workers_mutex

Protected Attributes inherited from cubthread::worker_pool::core

See cubthread::worker_pool::core

Type Name
worker_pool * m_parent_pool
bool m_pool_threads

Protected Functions

Type Name
virtual std::unique_ptr< worker > allocate_worker (bool is_temp=false)
virtual void allocate_workers (std::size_t worker_count)
core_impl (bool pool_threads)
virtual void execute_task_as_temp (wrapped_task && task_ref)
virtual void initialize_workers ()

Protected Functions inherited from cubthread::worker_pool::core

See cubthread::worker_pool::core

Type Name
core (bool pool_threads)

Public Functions Documentation

function become_available

void cubthread::worker_pool_impl::core_impl::become_available (
    worker & worker_arg
) 

function check_worker_not_available

void cubthread::worker_pool_impl::core_impl::check_worker_not_available (
    const  worker & worker_arg
) 

function execute_task

virtual void cubthread::worker_pool_impl::core_impl::execute_task (
    task_type * task_p,
    bool is_temp
) override

Implements cubthread::worker_pool::core::execute_task


function free_all_temp_list

void cubthread::worker_pool_impl::core_impl::free_all_temp_list () 

function get_stats

virtual void cubthread::worker_pool_impl::core_impl::get_stats (
    cubperf::stat_value * stats_out
) override const

Implements cubthread::worker_pool::core::get_stats


function get_task_or_become_available

std::optional< wrapped_task > cubthread::worker_pool_impl::core_impl::get_task_or_become_available (
    worker & worker_arg
) 

function get_worker_count

virtual std::size_t cubthread::worker_pool_impl::core_impl::get_worker_count (
    void
) override const

Implements cubthread::worker_pool::core::get_worker_count


function initialize

virtual void cubthread::worker_pool_impl::core_impl::initialize (
    std::size_t worker_count
) override

Implements cubthread::worker_pool::core::initialize


function map_running_contexts

template<typename  Func, typename ... Args>
void cubthread::worker_pool_impl::core_impl::map_running_contexts (
    bool & stop,
    Func && func,
    Args &&... args
) const

function register_free_temp_list

void cubthread::worker_pool_impl::core_impl::register_free_temp_list (
    worker * w
) 

function retire_queued_tasks

void cubthread::worker_pool_impl::core_impl::retire_queued_tasks (
    void
) 

function stop_execution

virtual bool cubthread::worker_pool_impl::core_impl::stop_execution (
    void
) override

Implements cubthread::worker_pool::core::stop_execution


function warmup

virtual void cubthread::worker_pool_impl::core_impl::warmup (
    void
) override

Implements cubthread::worker_pool::core::warmup


function ~core_impl

virtual cubthread::worker_pool_impl::core_impl::~core_impl (
    void
) 

Protected Attributes Documentation

variable m_available_workers

std::vector<worker *> cubthread::worker_pool_impl< Stats >::core_impl::m_available_workers;

variable m_free_temp_workers

std::vector<std::unique_ptr<worker> > cubthread::worker_pool_impl< Stats >::core_impl::m_free_temp_workers;

variable m_task_queue

std::queue<wrapped_task> cubthread::worker_pool_impl< Stats >::core_impl::m_task_queue;

variable m_temp_workers

std::vector<std::unique_ptr<worker> > cubthread::worker_pool_impl< Stats >::core_impl::m_temp_workers;

variable m_temp_workers_mutex

std::mutex cubthread::worker_pool_impl< Stats >::core_impl::m_temp_workers_mutex;

variable m_workers

std::vector<std::unique_ptr<worker> > cubthread::worker_pool_impl< Stats >::core_impl::m_workers;

variable m_workers_mutex

std::mutex cubthread::worker_pool_impl< Stats >::core_impl::m_workers_mutex;

Protected Functions Documentation

function allocate_worker

virtual std::unique_ptr< worker > cubthread::worker_pool_impl::core_impl::allocate_worker (
    bool is_temp=false
) 

function allocate_workers

virtual void cubthread::worker_pool_impl::core_impl::allocate_workers (
    std::size_t worker_count
) 

function core_impl

cubthread::worker_pool_impl::core_impl::core_impl (
    bool pool_threads
) 

function execute_task_as_temp

virtual void cubthread::worker_pool_impl::core_impl::execute_task_as_temp (
    wrapped_task && task_ref
) 

function initialize_workers

virtual void cubthread::worker_pool_impl::core_impl::initialize_workers () 


The documentation for this class was generated from the following file cubrid/src/thread/thread_worker_pool_impl.hpp