diff options
author | Craig Tiller <ctiller@google.com> | 2017-07-21 13:27:27 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-07-21 13:27:27 -0700 |
commit | 1890883adc8f6ca6f74ef21398cb51524e43966c (patch) | |
tree | a7fe57c5ea50eb1de2f3dc5530e3b0945aa118b4 /src/core/lib/iomgr | |
parent | 4c0ac4a9f547241a093355bc97c452be45a8270c (diff) |
Fix race
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r-- | src/core/lib/iomgr/executor.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |