diff options
author | Craig Tiller <ctiller@google.com> | 2017-09-08 14:42:26 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-09-08 14:42:26 -0700 |
commit | b0ce25e705f935e70f0840c3ba3436067553f6e2 (patch) | |
tree | c7293d7f812d003e4704cbc22bbee9dbbec5b3f3 /src | |
parent | 55863ff5272bf9c7e08a96ab0f4e50f0aafe6b0a (diff) |
Add comment
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/iomgr/executor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.c index a41c43edfd..6e8c896ed6 100644 --- a/src/core/lib/iomgr/executor.c +++ b/src/core/lib/iomgr/executor.c @@ -230,6 +230,10 @@ static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure, } gpr_mu_lock(&ts->mu); if (ts->queued_long_job) { + // if there's a long job queued, we never queue anything else to this + // queue (since long jobs can take 'infinite' time and we need to + // guarantee no starvation) + // ... spin through queues and try again gpr_mu_unlock(&ts->mu); size_t idx = (size_t)(ts - g_thread_state); ts = &g_thread_state[(idx + 1) % cur_thread_count]; |