]> err.no Git - varnish/commitdiff
Fix a startup race condition: Make sure the threadpools are created
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 25 Jun 2008 15:36:28 +0000 (15:36 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 25 Jun 2008 15:36:28 +0000 (15:36 +0000)
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

index 5891bd8c5bfd86a863f399d8d7f7979c0529b21c..ea09dbfc641476df77d8ebcd94ed29e3ecf27a2e 100644 (file)
@@ -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));