From 2d2711f9e6fd3ac783f400fcd4e72798636f194e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Sep 2015 09:46:57 -0700 Subject: [PATCH] Poke fd workqueues on add - to unblock a potential starvation issue --- src/core/iomgr/pollset_posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 2ed8c84ebbf..291181d9a52 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -145,6 +145,7 @@ void grpc_pollset_add_fd(grpc_pollset *pollset, grpc_fd *fd) { } gpr_mu_lock(&pollset->mu); pollset->vtable->add_fd(pollset, fd, 1); + grpc_workqueue_flush(fd->workqueue, 0); /* the following (enabled only in debug) will reacquire and then release our lock - meaning that if the unlocking flag passed to del_fd above is not respected, the code will deadlock (in a way that we have a chance of