Commit e2daea4a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make sure all pools have their minimum complement of threads.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2765 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent e49fee7a
......@@ -530,12 +530,19 @@ wrk_breed_flock(struct wq *qp)
static void *
wrk_herder_thread(void *priv)
{
unsigned u;
unsigned u, w;
THR_Name("wrk_herder");
(void)priv;
while (1) {
for (u = 0 ; u < nwq; u++) {
/*
* Make sure all pools have their minimum complement
*/
for (w = 0 ; w < nwq; w++) {
if (wq[w]->nthr < nthr_min)
wrk_breed_flock(wq[w]);
}
/*
* We cannot avoid getting a mutex, so we have a
* bogo mutex just for POSIX_STUPIDITY
......
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