From: chris mikkelson Date: Wed, 29 Apr 2009 16:32:59 +0000 (-0500) Subject: signal "listen condition" when below maximum concurrency. X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=c43a81d673d6b14f15cbcf4ddd936a9be04fb6f0;p=smtpsink signal "listen condition" when below maximum concurrency. --- diff --git a/conn_pool.c b/conn_pool.c index f631f3b..8a9d4eb 100644 --- a/conn_pool.c +++ b/conn_pool.c @@ -73,6 +73,7 @@ close_conn(struct conn *c) if (pthread_mutex_lock(&cp.cpmtx)) assert(0); cp.count --; STAILQ_INSERT_HEAD(&cp.c_pool, c, c_list); + if (cp.count < cp.limit) pthread_cond_signal(&cp.ac); pthread_mutex_unlock(&cp.cpmtx); }