aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2018-07-10 14:21:51 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2018-07-10 14:21:51 -0700
commit02872df249e72e0b9ea783d6ffc566a6fc539f04 (patch)
tree367f699640c6f2090b8a2721b53cc167b8c1a9b3 /src/core
parent8cc3a003a1094215fcccf8e21cd5b72611b51fe1 (diff)
more code review comments
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lib/iomgr/executor.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc
index a7fe6c7fae..b01fea0c2d 100644
--- a/src/core/lib/iomgr/executor.cc
+++ b/src/core/lib/iomgr/executor.cc
@@ -103,7 +103,7 @@ void GrpcExecutor::SetThreading(bool threading) {
thd_state_[0].thd =
grpc_core::Thread(name_, &GrpcExecutor::ThreadMain, &thd_state_[0]);
thd_state_[0].thd.Start();
- } else {
+ } else { // !threading
if (curr_num_threads == 0) return;
for (size_t i = 0; i < max_threads_; i++) {
@@ -120,6 +120,7 @@ void GrpcExecutor::SetThreading(bool threading) {
for (gpr_atm i = 0; i < num_threads_; i++) {
thd_state_[i].thd.Join();
+ EXECUTOR_TRACE(" Thread %" PRIdPTR " joined", i);
}
gpr_atm_no_barrier_store(&num_threads_, 0);
@@ -138,7 +139,7 @@ void GrpcExecutor::Shutdown() { SetThreading(false); }
void GrpcExecutor::ThreadMain(void* arg) {
ThreadState* ts = static_cast<ThreadState*>(arg);
- gpr_tls_set(&g_this_thread_state, (intptr_t)ts);
+ gpr_tls_set(&g_this_thread_state, reinterpret_cast<intptr_t>(ts));
grpc_core::ExecCtx exec_ctx(GRPC_EXEC_CTX_FLAG_IS_INTERNAL_THREAD);