diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-02 10:58:11 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-02 10:58:11 -0700 |
commit | 670106ebb29b00c13ef401c8a920004abb3ede16 (patch) | |
tree | c2139a232d000b00319c58e370f12f8c00e511cb /src/core/lib | |
parent | dc84ed63d7567dd37ca2b61f9fc51b8e7fc5e4c9 (diff) |
Add grpc_exec_ctx_invalidate_now in grpc_pollset_work right after gpr_cv_wait
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/pollset_windows.cc | 2 | ||||
-rw-r--r-- | src/core/lib/surface/completion_queue.cc | 1 |
2 files changed, 2 insertions, 1 deletions
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 && |