From 4d8f268028546de32d1bce40f6e1a82c868f1758 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 27 Apr 2015 10:40:08 -0700 Subject: [PATCH] Add a lock that seems to help --- src/core/surface/completion_queue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index 24f4a05071a..f3c2453b5e7 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -401,7 +401,9 @@ static void on_pollset_destroy_done(void *arg) { } void grpc_completion_queue_destroy(grpc_completion_queue *cc) { + gpr_mu_lock(GRPC_POLLSET_MU(&cc->pollset)); GPR_ASSERT(cc->queue == NULL); + gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset)); grpc_pollset_shutdown(&cc->pollset, on_pollset_destroy_done, cc); }