Go to the documentation of this file.
35 "ThreadPool Worker [%s %d] Stats: sleep_time %f",
40 if (
elem ==
nullptr) {
66 #if defined(__ANDROID__) || defined(__APPLE__)
96 thread_options_(thread_options) {
105 shut_down_.store(
true, std::memory_order_relaxed);
size_t DefaultStackSize()
GPRAPI double gpr_timespec_to_micros(gpr_timespec t)
const char * thread_name() const override
#define GPR_DEBUG_ASSERT(x)
ThreadPoolWorker ** threads_
GPRAPI gpr_timespec gpr_time_0(gpr_clock_type type)
ThreadPool(int num_threads)
GPRAPI void gpr_free(void *ptr)
virtual int count() const =0
int num_pending_closures() const override
DebugOnlyTraceFlag grpc_thread_pool_trace(false, "thread_pool")
#define GRPC_TRACE_FLAG_ENABLED(f)
const Thread::Options & thread_options() const override
GPRAPI void * gpr_zalloc(size_t size)
void SharedThreadPoolConstructor()
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
std::atomic< bool > shut_down_
Options & set_stack_size(size_t bytes)
size_t stack_size() const
virtual void * Get(gpr_timespec *wait_time)=0
Options & set_joinable(bool joinable)
Set whether the thread is joinable or detached.
Thread::Options thread_options_
void AssertHasNotBeenShutDown()
MPMCQueueInterface * queue_
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b)
static volatile int num_threads
MPMCQueueInterface * queue_
void Add(grpc_completion_queue_functor *closure) override
virtual void Put(void *elem)=0
int pool_capacity() const override
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:37