Skip to content
Snippets Groups Projects
Commit 67cda0a7 authored by yang-g's avatar yang-g
Browse files

Unref pending events under cq lock

parent bcb65f0b
No related branches found
No related tags found
No related merge requests found
...@@ -582,9 +582,9 @@ static void cq_end_op_for_next(grpc_exec_ctx *exec_ctx, ...@@ -582,9 +582,9 @@ static void cq_end_op_for_next(grpc_exec_ctx *exec_ctx,
cq_event_queue_push(&cqd->queue, storage); cq_event_queue_push(&cqd->queue, storage);
gpr_atm_no_barrier_fetch_add(&cqd->things_queued_ever, 1); gpr_atm_no_barrier_fetch_add(&cqd->things_queued_ever, 1);
int shutdown = gpr_unref(&cqd->pending_events);
gpr_mu_lock(cqd->mu); gpr_mu_lock(cqd->mu);
int shutdown = gpr_unref(&cqd->pending_events);
if (!shutdown) { if (!shutdown) {
grpc_error *kick_error = cc->poller_vtable->kick(POLLSET_FROM_CQ(cc), NULL); grpc_error *kick_error = cc->poller_vtable->kick(POLLSET_FROM_CQ(cc), NULL);
gpr_mu_unlock(cqd->mu); gpr_mu_unlock(cqd->mu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment