From: Art Cancro Date: Mon, 13 Sep 2010 19:19:46 +0000 (-0400) Subject: Fixed a race condition which made the thread pool size unnecessarily large. X-Git-Tag: v8.01~716 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=8837ef861d6cad629f9902749f7b05dbe8383d79 Fixed a race condition which made the thread pool size unnecessarily large. --- diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 2dd63c9a2..266b2f4c7 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -114,7 +114,7 @@ void check_thread_pool_size(void) if (time_to_die) return; /* don't expand the thread pool during shutdown */ begin_critical_section(S_SPAWNER); /* only one of these should run at a time */ - while ( + if ( (num_threads_executing >= num_threads_existing) && (num_threads_existing < MAX_WORKER_THREADS) ) {