19 #ifndef GRPC_CORE_LIB_IOMGR_EXECUTOR_THREADPOOL_H 20 #define GRPC_CORE_LIB_IOMGR_EXECUTOR_THREADPOOL_H 67 : queue_(queue), thd_name_(thd_name), index_(index) {
70 this,
nullptr, options);
87 MPMCQueueInterface* queue_;
90 const char* thd_name_;
106 ThreadPool(
int num_threads,
const char* thd_name);
115 ThreadPool(
int num_threads,
const char* thd_name,
131 int num_threads_ = 0;
132 const char* thd_name_ =
nullptr;
139 void SharedThreadPoolConstructor();
142 size_t DefaultStackSize();
144 void AssertHasNotBeenShutDown();
int num_pending_closures() const override
void Add(grpc_experimental_completion_queue_functor *closure) override
Definition: mpmcqueue.h:34
Unmeasurable clock type: no base, created by taking the difference between two times.
Definition: gpr_types.h:42
void Join()
Definition: threadpool.h:76
void Join()
Definition: thd.h:144
Definition: threadpool.h:36
virtual const char * thread_name() const =0
ThreadPool(int num_threads)
~ThreadPoolWorker()
Definition: threadpool.h:73
Internal thread interface.
Definition: backoff.h:26
virtual ~ThreadPoolInterface()
Definition: threadpool.h:39
void Start()
Definition: threadpool.h:75
ThreadPoolWorker(const char *thd_name, MPMCQueueInterface *queue, Thread::Options &options, int index)
Definition: threadpool.h:65
GPRAPI gpr_timespec gpr_time_0(gpr_clock_type type)
Time constants.
Definition: threadpool.h:97
virtual int num_pending_closures() const =0
int pool_capacity() const override
Definition: threadpool.h:63
virtual void Add(grpc_experimental_completion_queue_functor *closure)=0
virtual const Thread::Options & thread_options() const =0
Analogous to struct timespec.
Definition: gpr_types.h:47
const Thread::Options & thread_options() const override
virtual int pool_capacity() const =0
const char * thread_name() const override
EXPERIMENTAL: Specifies an interface class to be used as a tag for callback-based completion queues...
Definition: grpc_types.h:722
void Start()
Definition: thd.h:128