[master] 1418ca7 Make sure the thread pool herders wake up every so often so they notice if the params have changed.

Poul-Henning Kamp phk at FreeBSD.org
Fri Feb 7 13:04:15 CET 2014


commit 1418ca74677af0fc9feae0fcd3090dcd4f531554
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Feb 7 11:56:56 2014 +0000

    Make sure the thread pool herders wake up every so often so they
    notice if the params have changed.

diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index b22fe09..75fac47 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -411,7 +411,8 @@ pool_herder(void *priv)
 
 		Lck_Lock(&pp->mtx);
 		if (!pp->dry) {
-			(void)Lck_CondWait(&pp->herder_cond, &pp->mtx, 0);
+			(void)Lck_CondWait(&pp->herder_cond, &pp->mtx,
+				VTIM_real() + 5);
 		} else {
 			/* XXX: unsafe counters */
 			VSC_C_main->threads_limited++;



More information about the varnish-commit mailing list