From 8cf88f1eb169f5bae7ddfbdd571fd4c27ba5e1bf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 12 Jan 2017 14:04:43 -0800 Subject: Add a mechanism for tagging threads that might be owned by calls/channels Use it to ensure we don't delete the call from that thread: doing so would create a cycle that's kind of bad. --- src/core/lib/surface/completion_queue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/lib/surface/completion_queue.c') diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 20c22ea2bc..1830842d00 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -402,8 +402,8 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, .stolen_completion = NULL, .tag = NULL, .first_loop = true}; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( - cq_is_next_finished, &is_finished_arg); + grpc_exec_ctx exec_ctx = + GRPC_EXEC_CTX_INITIALIZER(0, cq_is_next_finished, &is_finished_arg); for (;;) { if (is_finished_arg.stolen_completion != NULL) { gpr_mu_unlock(cc->mu); @@ -571,8 +571,8 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, .stolen_completion = NULL, .tag = tag, .first_loop = true}; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( - cq_is_pluck_finished, &is_finished_arg); + grpc_exec_ctx exec_ctx = + GRPC_EXEC_CTX_INITIALIZER(0, cq_is_pluck_finished, &is_finished_arg); for (;;) { if (is_finished_arg.stolen_completion != NULL) { gpr_mu_unlock(cc->mu); -- cgit v1.2.3