From 8dacea4e5ae53b6225ce46778b4d266c59175cb4 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 8559f09b0..b506428b0 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -116,7 +116,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