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();
Definition: mpmcqueue.h:34
void Join()
Definition: thd.h:144
void Start()
Definition: thd.h:128
Definition: threadpool.h:97
int pool_capacity() const override
Definition: threadpool.cc:130
int num_pending_closures() const override
Definition: threadpool.cc:128
~ThreadPool() override
Definition: threadpool.cc:104
const Thread::Options & thread_options() const override
Definition: threadpool.cc:132
const char * thread_name() const override
Definition: threadpool.cc:136
void Add(grpc_experimental_completion_queue_functor *closure) override
Definition: threadpool.cc:123
ThreadPool(int num_threads)
Definition: threadpool.cc:79
Definition: threadpool.h:36
virtual void Add(grpc_experimental_completion_queue_functor *closure)=0
virtual ~ThreadPoolInterface()
Definition: threadpool.h:39
virtual int pool_capacity() const =0
virtual const Thread::Options & thread_options() const =0
virtual const char * thread_name() const =0
virtual int num_pending_closures() const =0
Definition: threadpool.h:63
void Start()
Definition: threadpool.h:75
void Join()
Definition: threadpool.h:76
ThreadPoolWorker(const char *thd_name, MPMCQueueInterface *queue, Thread::Options &options, int index)
Definition: threadpool.h:65
~ThreadPoolWorker()
Definition: threadpool.h:73
@ GPR_TIMESPAN
Unmeasurable clock type: no base, created by taking the difference between two times.
Definition: gpr_types.h:42
Round Robin Policy.
Definition: backend_metric.cc:24
Analogous to struct timespec.
Definition: gpr_types.h:47
EXPERIMENTAL: Specifies an interface class to be used as a tag for callback-based completion queues.
Definition: grpc_types.h:722
GPRAPI gpr_timespec gpr_time_0(gpr_clock_type type)
Time constants.
Definition: time.cc:46