Merge pull request #17901 from vjpai/unlock_cq

Remove an overly-conservative mutex from callback CQ implementation
pull/17439/head
Vijay Pai 6 years ago committed by GitHub
commit cc392e89bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/lib/surface/completion_queue.cc

@ -854,15 +854,11 @@ static void cq_end_op_for_callback(
// for reserved storage. Invoke the done callback right away to release it.
done(done_arg, storage);
gpr_mu_lock(cq->mu);
cq_check_tag(cq, tag, false); /* Used in debug builds only */
cq_check_tag(cq, tag, true); /* Used in debug builds only */
gpr_atm_no_barrier_fetch_add(&cqd->things_queued_ever, 1);
if (gpr_atm_full_fetch_add(&cqd->pending_events, -1) == 1) {
gpr_mu_unlock(cq->mu);
cq_finish_shutdown_callback(cq);
} else {
gpr_mu_unlock(cq->mu);
}
GRPC_ERROR_UNREF(error);

Loading…
Cancel
Save