From: phk Date: Wed, 25 Jun 2008 15:36:28 +0000 (+0000) Subject: Fix a startup race condition: Make sure the threadpools are created X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19859d9befb142278c8b10e0b5a06a53f3db5bbe;p=varnish 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 --- 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));