diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-06-24 23:28:05 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-06-24 23:28:08 +0200 |
commit | e57dd66c9d2cb9ee804d2b3c384ac8b19d86133a (patch) | |
tree | 44ab0502c60b5d2f49737ac2a2eae583ef47ba82 | |
parent | 66daf23401dd96b3fc6097738b7abfa8a43b709a (diff) |
Cascade-kick pollsets when shutting down.
In the case we're using a threadpool, depending on where the threads are waiting in completion queue's next, they'll get stuck on shutdown because we're only kicking one of them. Instead, let's cascade-kick the pollsets when we shutdown so that we make sure all of them are exitting properly.
-rw-r--r-- | src/core/surface/completion_queue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index bd0fabf9da..063a23cfb1 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -208,6 +208,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, } if (cc->shutdown) { ev = create_shutdown_event(); + grpc_pollset_kick(&cc->pollset); break; } if (!grpc_pollset_work(&cc->pollset, deadline)) { |