Fixed a race condition which made the thread pool size unnecessarily large.
authorArt Cancro <ajc@citadel.org>
Mon, 13 Sep 2010 19:19:46 +0000 (15:19 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 13 Sep 2010 22:02:07 +0000 (00:02 +0200)
webcit/context_loop.c

index 8559f09b02006b489f794ebe567d569a9124d1cb..b506428b02387551563e337fdebb50da2dea5318 100644 (file)
@@ -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)
        ) {