|
|
|
@ -199,6 +199,7 @@ struct grpc_pollset { |
|
|
|
|
pollable* active_pollable; |
|
|
|
|
bool kicked_without_poller; |
|
|
|
|
grpc_closure* shutdown_closure; |
|
|
|
|
bool already_shutdown; |
|
|
|
|
grpc_pollset_worker* root_worker; |
|
|
|
|
int containing_pollset_set_count; |
|
|
|
|
}; |
|
|
|
@ -562,6 +563,7 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) { |
|
|
|
|
pollset->containing_pollset_set_count == 0) { |
|
|
|
|
GRPC_CLOSURE_SCHED(pollset->shutdown_closure, GRPC_ERROR_NONE); |
|
|
|
|
pollset->shutdown_closure = nullptr; |
|
|
|
|
pollset->already_shutdown = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -862,7 +864,8 @@ static worker_remove_result worker_remove(grpc_pollset_worker** root_worker, |
|
|
|
|
static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, |
|
|
|
|
grpc_pollset_worker** worker_hdl, |
|
|
|
|
grpc_millis deadline) { |
|
|
|
|
bool do_poll = (pollset->shutdown_closure == nullptr); |
|
|
|
|
bool do_poll = |
|
|
|
|
(pollset->shutdown_closure == nullptr && !pollset->already_shutdown); |
|
|
|
|
if (worker_hdl != nullptr) *worker_hdl = worker; |
|
|
|
|
worker->initialized_cv = false; |
|
|
|
|
worker->kicked = false; |
|
|
|
|