For executor threads, we can use Executor::SetThreadingAll(false) to shut down. If there is no thread, it still works according to the following code.
void Executor::Enqueue(grpc_closure* closure, grpc_error_handle error, bool is_short) ... do { retry_push = false; size_t cur_thread_count = static_cast<size_t>(gpr_atm_acq_load(&num_threads_)); * // If the number of threads is zero(i.e either the executor is not threaded* * // or already shutdown), then queue the closure on the exec context itself* *if (cur_thread_count == 0) {* #ifndef NDEBUG EXECUTOR_TRACE("(%s) schedule %p (created %s:%d) inline", name_, closure, closure->file_created, closure->line_created); #else EXECUTOR_TRACE("(%s) schedule %p inline", name_, closure); #endif grpc_closure_list_append(grpc_core::ExecCtx::Get()->closure_list(), closure, error); return; } For the timer thread, there is a function to shut it down. However I cannot tell what is the impact if there is no such a thread. I also don't know the timer is used. void grpc_timer_manager_set_threading(bool enabled); Anybody has any insight? Thanks, Alex -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/06381e09-9771-4e8e-9787-5f2c59ce8127n%40googlegroups.com.