Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
grpc::DynamicThreadPool Class Referencefinal

#include <dynamic_thread_pool.h>

Inheritance diagram for grpc::DynamicThreadPool:
Inheritance graph
[legend]

Classes

class  DynamicThread
 

Public Member Functions

void Add (const std::function< void()> &callback) override
 
 DynamicThreadPool (int reserve_threads)
 
 ~DynamicThreadPool () override
 
- Public Member Functions inherited from grpc::ThreadPoolInterface
virtual ~ThreadPoolInterface ()
 

Private Member Functions

void ThreadFunc ()
 

Static Private Member Functions

static void ReapThreads (std::list< DynamicThread * > *tlist)
 

Private Attributes

std::queue< std::function< void()> > callbacks_
 
grpc_core::CondVar cv_
 
std::list< DynamicThread * > dead_threads_
 
grpc_core::Mutex mu_
 
int nthreads_
 
int reserve_threads_
 
bool shutdown_
 
grpc_core::CondVar shutdown_cv_
 
int threads_waiting_
 

Detailed Description

Definition at line 32 of file dynamic_thread_pool.h.

Constructor & Destructor Documentation

◆ DynamicThreadPool()

grpc::DynamicThreadPool::DynamicThreadPool ( int  reserve_threads)
explicit

Definition at line 76 of file dynamic_thread_pool.cc.

◆ ~DynamicThreadPool()

grpc::DynamicThreadPool::~DynamicThreadPool ( )
override

Definition at line 94 of file dynamic_thread_pool.cc.

Member Function Documentation

◆ Add()

void grpc::DynamicThreadPool::Add ( const std::function< void()> &  callback)
overridevirtual

Implements grpc::ThreadPoolInterface.

Definition at line 104 of file dynamic_thread_pool.cc.

◆ ReapThreads()

void grpc::DynamicThreadPool::ReapThreads ( std::list< DynamicThread * > *  tlist)
staticprivate

Definition at line 88 of file dynamic_thread_pool.cc.

◆ ThreadFunc()

void grpc::DynamicThreadPool::ThreadFunc ( )
private

Definition at line 50 of file dynamic_thread_pool.cc.

Member Data Documentation

◆ callbacks_

std::queue<std::function<void()> > grpc::DynamicThreadPool::callbacks_
private

Definition at line 54 of file dynamic_thread_pool.h.

◆ cv_

grpc_core::CondVar grpc::DynamicThreadPool::cv_
private

Definition at line 51 of file dynamic_thread_pool.h.

◆ dead_threads_

std::list<DynamicThread*> grpc::DynamicThreadPool::dead_threads_
private

Definition at line 58 of file dynamic_thread_pool.h.

◆ mu_

grpc_core::Mutex grpc::DynamicThreadPool::mu_
private

Definition at line 50 of file dynamic_thread_pool.h.

◆ nthreads_

int grpc::DynamicThreadPool::nthreads_
private

Definition at line 56 of file dynamic_thread_pool.h.

◆ reserve_threads_

int grpc::DynamicThreadPool::reserve_threads_
private

Definition at line 55 of file dynamic_thread_pool.h.

◆ shutdown_

bool grpc::DynamicThreadPool::shutdown_
private

Definition at line 53 of file dynamic_thread_pool.h.

◆ shutdown_cv_

grpc_core::CondVar grpc::DynamicThreadPool::shutdown_cv_
private

Definition at line 52 of file dynamic_thread_pool.h.

◆ threads_waiting_

int grpc::DynamicThreadPool::threads_waiting_
private

Definition at line 57 of file dynamic_thread_pool.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:31