Agora  1.2.0
Agora project
spdlog::details::thread_pool Class Reference

#include <thread_pool.h>

Collaboration diagram for spdlog::details::thread_pool:

Public Types

using item_type = async_msg
 
using q_type = details::mpmc_blocking_queue< item_type >
 

Public Member Functions

 thread_pool (size_t q_max_items, size_t threads_n, std::function< void()> on_thread_start, std::function< void()> on_thread_stop)
 
 thread_pool (size_t q_max_items, size_t threads_n, std::function< void()> on_thread_start)
 
 thread_pool (size_t q_max_items, size_t threads_n)
 
 ~thread_pool ()
 
 thread_pool (const thread_pool &)=delete
 
thread_pooloperator= (thread_pool &&)=delete
 
void post_log (async_logger_ptr &&worker_ptr, const details::log_msg &msg, async_overflow_policy overflow_policy)
 
void post_flush (async_logger_ptr &&worker_ptr, async_overflow_policy overflow_policy)
 
size_t overrun_counter ()
 
size_t queue_size ()
 

Private Member Functions

void post_async_msg_ (async_msg &&new_msg, async_overflow_policy overflow_policy)
 
void worker_loop_ ()
 
bool process_next_msg_ ()
 

Private Attributes

q_type q_
 
std::vector< std::thread > threads_
 

Member Typedef Documentation

◆ item_type

◆ q_type

Constructor & Destructor Documentation

◆ thread_pool() [1/4]

SPDLOG_INLINE spdlog::details::thread_pool::thread_pool ( size_t  q_max_items,
size_t  threads_n,
std::function< void()>  on_thread_start,
std::function< void()>  on_thread_stop 
)
Here is the call graph for this function:

◆ thread_pool() [2/4]

SPDLOG_INLINE spdlog::details::thread_pool::thread_pool ( size_t  q_max_items,
size_t  threads_n,
std::function< void()>  on_thread_start 
)

◆ thread_pool() [3/4]

SPDLOG_INLINE spdlog::details::thread_pool::thread_pool ( size_t  q_max_items,
size_t  threads_n 
)

◆ ~thread_pool()

SPDLOG_INLINE spdlog::details::thread_pool::~thread_pool ( )
Here is the call graph for this function:

◆ thread_pool() [4/4]

spdlog::details::thread_pool::thread_pool ( const thread_pool )
delete

Member Function Documentation

◆ operator=()

thread_pool& spdlog::details::thread_pool::operator= ( thread_pool &&  )
delete

◆ overrun_counter()

size_t SPDLOG_INLINE spdlog::details::thread_pool::overrun_counter ( )
Here is the call graph for this function:

◆ post_async_msg_()

void SPDLOG_INLINE spdlog::details::thread_pool::post_async_msg_ ( async_msg &&  new_msg,
async_overflow_policy  overflow_policy 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ post_flush()

void SPDLOG_INLINE spdlog::details::thread_pool::post_flush ( async_logger_ptr &&  worker_ptr,
async_overflow_policy  overflow_policy 
)
Here is the call graph for this function:

◆ post_log()

void SPDLOG_INLINE spdlog::details::thread_pool::post_log ( async_logger_ptr &&  worker_ptr,
const details::log_msg msg,
async_overflow_policy  overflow_policy 
)
Here is the call graph for this function:

◆ process_next_msg_()

bool SPDLOG_INLINE spdlog::details::thread_pool::process_next_msg_ ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_size()

size_t SPDLOG_INLINE spdlog::details::thread_pool::queue_size ( )
Here is the call graph for this function:

◆ worker_loop_()

void SPDLOG_INLINE spdlog::details::thread_pool::worker_loop_ ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ q_

q_type spdlog::details::thread_pool::q_
private

◆ threads_

std::vector<std::thread> spdlog::details::thread_pool::threads_
private

The documentation for this class was generated from the following files: