From 19859d9befb142278c8b10e0b5a06a53f3db5bbe Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 25 Jun 2008 15:36:28 +0000 Subject: [PATCH] Fix a startup race condition: Make sure the threadpools are created before the herder starts, in order that it will create the minimum number of threads in the pool. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2806 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_pool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 5891bd8c..ea09dbfc 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -565,6 +565,7 @@ WRK_Init(void) AZ(pthread_cond_init(&herder_cond, NULL)); AZ(pthread_mutex_init(&herder_mtx, NULL)); + wrk_addpools(params->wthread_pools); AZ(pthread_create(&tp, NULL, wrk_herdtimer_thread, NULL)); AZ(pthread_detach(tp)); AZ(pthread_create(&tp, NULL, wrk_herder_thread, NULL)); -- 2.39.5