From 8837ef861d6cad629f9902749f7b05dbe8383d79 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 13 Sep 2010 15:19:46 -0400 Subject: [PATCH] Fixed a race condition which made the thread pool size unnecessarily large. --- webcit/context_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ) { -- 2.30.2