Skip to content
Snippets Groups Projects
Commit e57dd66c authored by Nicolas "Pixel" Noble's avatar Nicolas "Pixel" Noble
Browse files

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.
parent 66daf234
No related branches found
No related tags found
No related merge requests found
...@@ -208,6 +208,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, ...@@ -208,6 +208,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
} }
if (cc->shutdown) { if (cc->shutdown) {
ev = create_shutdown_event(); ev = create_shutdown_event();
grpc_pollset_kick(&cc->pollset);
break; break;
} }
if (!grpc_pollset_work(&cc->pollset, deadline)) { if (!grpc_pollset_work(&cc->pollset, deadline)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment