Go to the documentation of this file.
32 delete pool_size_zero;
39 options.set_stack_size(192 * 1024);
59 callback->count_.fetch_add(1, std::memory_order_relaxed);
62 int count() {
return count_.load(std::memory_order_relaxed); }
89 "thread_pool_test_add_thd",
112 const int num_work_thds = 10;
119 for (
int i = 0;
i < num_work_thds; ++
i) {
125 for (
int i = 0;
i < num_work_thds; ++
i) {
126 work_thds[
i]->
Join();
168 pool->Add(check_functors[
i]);
173 delete check_functors[
i];
179 int main(
int argc,
char** argv) {
static void test_multi_add(void)
~SimpleFunctorCheckForAdd()
static void test_add(void)
SimpleFunctorCheckForAdd(int ok, int *count)
WorkThread(grpc_core::ThreadPool *pool, SimpleFunctorForAdd *cb, int num_add)
GPRAPI void gpr_free(void *ptr)
static const int kThreadSmallIter
grpc_core::ThreadPool * pool_
GPRAPI void * gpr_zalloc(size_t size)
int main(int argc, char **argv)
static const int kLargeThreadPoolSize
void(* functor_run)(struct grpc_completion_queue_functor *, int)
static const int kSmallThreadPoolSize
static void test_size_zero(void)
static const int kThreadLargeIter
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
std::atomic< int > count_
struct grpc_completion_queue_functor * internal_next
static void callback(void *arg, int status, int timeouts, struct hostent *host)
static void Run(struct grpc_completion_queue_functor *cb, int)
void Add(grpc_completion_queue_functor *closure) override
InternalDescriptorPool * pool
SimpleFunctorForAdd * cb_
static void Run(struct grpc_completion_queue_functor *cb, int)
GRPCAPI void grpc_init(void)
GRPCAPI void grpc_shutdown(void)
static void test_one_thread_FIFO(void)
OPENSSL_EXPORT pem_password_cb * cb
int pool_capacity() const override
static void test_constructor_option(void)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:37