From c43a81d673d6b14f15cbcf4ddd936a9be04fb6f0 Mon Sep 17 00:00:00 2001 From: chris mikkelson Date: Wed, 29 Apr 2009 11:32:59 -0500 Subject: [PATCH] signal "listen condition" when below maximum concurrency. --- conn_pool.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.50.1