From: Wilfried Goesgens Date: Sat, 20 Apr 2013 11:16:37 +0000 (+0200) Subject: THREADS: config setting min_workers _now_ also is that, plus its also max_spare_workers X-Git-Tag: v8.20~55 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=3367e0fa984b3e5f61b2f75f07fc4e11f824bb73 THREADS: config setting min_workers _now_ also is that, plus its also max_spare_workers --- diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 4ea07f3ed..01e7e831d 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -1381,7 +1381,8 @@ SKIP_SELECT: pthread_mutex_lock(&ThreadCountMutex); --active_workers; - if (active_workers + config.c_min_workers < num_workers) + if ((active_workers + config.c_min_workers < num_workers) && + (num_workers > config.c_min_workers)) { num_workers--; pthread_mutex_unlock(&ThreadCountMutex);