From 1890883adc8f6ca6f74ef21398cb51524e43966c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 21 Jul 2017 13:27:27 -0700 Subject: Fix race --- src/core/lib/iomgr/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib/iomgr') diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.c index d2e532e488..5ee2c6e99b 100644 --- a/src/core/lib/iomgr/executor.c +++ b/src/core/lib/iomgr/executor.c @@ -225,7 +225,7 @@ static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure, if (ts->queued_long_job) { gpr_mu_unlock(&ts->mu); intptr_t idx = ts - g_thread_state; - ts = &g_thread_state[(idx + 1) % g_cur_threads]; + ts = &g_thread_state[(idx + 1) % cur_thread_count]; if (ts == orig_ts) { retry_push = true; try_new_thread = true; -- cgit v1.2.3