From 144521fc76b2c4af303ffd70e3fcd946866ee994 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 17 Apr 2017 20:19:04 +0000 Subject: [PATCH] sync fixes --- include/grpc++/server_builder.h | 2 +- src/core/lib/iomgr/ev_epollex_linux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index d707100a522..a0ba4fc8d28 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -195,7 +195,7 @@ class ServerBuilder { struct SyncServerSettings { SyncServerSettings() - : num_cqs(1), + : num_cqs(gpr_cpu_num_cores()), min_pollers(1), max_pollers(INT_MAX), cq_timeout_msec(1000) {} diff --git a/src/core/lib/iomgr/ev_epollex_linux.c b/src/core/lib/iomgr/ev_epollex_linux.c index a6fec5d49a1..af2908f16d4 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.c +++ b/src/core/lib/iomgr/ev_epollex_linux.c @@ -972,7 +972,7 @@ static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker, if (!worker_insert(&worker->pollable->root_worker, PWL_POLLABLE, worker)) { worker->initialized_cv = true; gpr_cv_init(&worker->cv); - while (pollset->root_worker != worker) { + while (worker->pollable->root_worker != worker) { if (gpr_cv_wait(&worker->cv, &pollset->current_pollable->po.mu, deadline)) { return false;