diff options
author | Yang Gao <yangg@google.com> | 2015-12-11 13:46:44 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-12-11 13:46:44 -0800 |
commit | 420effac80564a62774c27f51caaebfcaa072a99 (patch) | |
tree | fed81a90aa42fdfeef9cc9bea511a4cc223fb5f4 /src | |
parent | 5028de775f020ab48d5e3a02a137f6b9a8ace13c (diff) | |
parent | 97b51c06adfb232da404bb432331c905276ee7ff (diff) |
Merge pull request #4376 from ctiller/wqtest
Cover more of workqueue
Diffstat (limited to 'src')
-rw-r--r-- | src/core/iomgr/workqueue_posix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/iomgr/workqueue_posix.c b/src/core/iomgr/workqueue_posix.c index 2e30178131..d2a1c34612 100644 --- a/src/core/iomgr/workqueue_posix.c +++ b/src/core/iomgr/workqueue_posix.c @@ -103,6 +103,9 @@ void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { gpr_mu_lock(&workqueue->mu); + if (grpc_closure_list_empty(workqueue->closure_list)) { + grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); + } grpc_closure_list_move(&exec_ctx->closure_list, &workqueue->closure_list); gpr_mu_unlock(&workqueue->mu); } |