From 670106ebb29b00c13ef401c8a920004abb3ede16 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Thu, 2 Nov 2017 10:58:11 -0700 Subject: Add grpc_exec_ctx_invalidate_now in grpc_pollset_work right after gpr_cv_wait --- src/core/lib/iomgr/pollset_windows.cc | 2 ++ src/core/lib/surface/completion_queue.cc | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc index bb4df83fc1..01aff02c36 100644 --- a/src/core/lib/iomgr/pollset_windows.cc +++ b/src/core/lib/iomgr/pollset_windows.cc @@ -161,8 +161,10 @@ grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, while (!worker.kicked) { if (gpr_cv_wait(&worker.cv, &grpc_polling_mu, grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME))) { + grpc_exec_ctx_invalidate_now(exec_ctx); break; } + grpc_exec_ctx_invalidate_now(exec_ctx); } } else { pollset->kicked_without_pollers = 0; diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index a2d714a6df..5009f786e6 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -972,7 +972,6 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline, break; } is_finished_arg.first_loop = false; - grpc_exec_ctx_invalidate_now(&exec_ctx); } if (cq_event_queue_num_items(&cqd->queue) > 0 && -- cgit v1.2.3