Clear thread local after use

pull/20297/head
yang-g 5 years ago
parent 84f113ff50
commit 4ba19b29f8
  1. 2
      src/core/lib/iomgr/executor.cc

@ -264,6 +264,8 @@ void Executor::ThreadMain(void* arg) {
grpc_core::ExecCtx::Get()->InvalidateNow();
subtract_depth = RunClosures(ts->name, closures);
}
// Clear the thread local after use.
gpr_tls_set(&g_this_thread_state, reinterpret_cast<intptr_t>(nullptr));
}
void Executor::Enqueue(grpc_closure* closure, grpc_error* error,

Loading…
Cancel
Save