Merge pull request #11201 from yang-g/debug

Unref pending events under cq lock
This commit is contained in:
Yang Gao 2017-05-17 23:38:40 -07:00 committed by GitHub
commit aaefea25b1
1 changed files with 2 additions and 2 deletions

View File

@ -582,9 +582,9 @@ static void cq_end_op_for_next(grpc_exec_ctx *exec_ctx,
cq_event_queue_push(&cqd->queue, storage);
gpr_atm_no_barrier_fetch_add(&cqd->things_queued_ever, 1);
int shutdown = gpr_unref(&cqd->pending_events);
gpr_mu_lock(cqd->mu);
int shutdown = gpr_unref(&cqd->pending_events);
if (!shutdown) {
grpc_error *kick_error = cc->poller_vtable->kick(POLLSET_FROM_CQ(cc), NULL);
gpr_mu_unlock(cqd->mu);