Merge pull request #17089 from vjpai/callback_shutdown

Resolve a deadlock in callback CQ shutdown
pull/17127/head
Vijay Pai 6 years ago committed by GitHub
commit 233de3d7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/lib/surface/completion_queue.cc

@ -859,8 +859,8 @@ static void cq_end_op_for_callback(
gpr_atm_no_barrier_fetch_add(&cqd->things_queued_ever, 1); gpr_atm_no_barrier_fetch_add(&cqd->things_queued_ever, 1);
if (gpr_atm_full_fetch_add(&cqd->pending_events, -1) == 1) { if (gpr_atm_full_fetch_add(&cqd->pending_events, -1) == 1) {
cq_finish_shutdown_callback(cq);
gpr_mu_unlock(cq->mu); gpr_mu_unlock(cq->mu);
cq_finish_shutdown_callback(cq);
} else { } else {
gpr_mu_unlock(cq->mu); gpr_mu_unlock(cq->mu);
} }

Loading…
Cancel
Save