Commit 645c7fa1 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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: http://www.varnish-cache.org/svn/trunk/varnish-cache@2806 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 34f28f42
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment