From 9c15c062986014ceb59cc1325e6a2145090dded7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 28 Sep 2008 19:10:57 +0000 Subject: [PATCH] move cache broadcast into enqueue_cache_item -- kevin brintnall git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1534 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_daemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index f1b8f8bb..f746a35c 100644 --- a/program/src/rrd_daemon.c +++ b/program/src/rrd_daemon.c @@ -428,6 +428,7 @@ static int enqueue_cache_item (cache_item_t *ci, /* {{{ */ if (did_insert) { + pthread_cond_broadcast(&cache_cond); pthread_mutex_lock (&stats_lock); stats_queue_length++; pthread_mutex_unlock (&stats_lock); @@ -750,7 +751,6 @@ static int flush_file (const char *filename) /* {{{ */ /* Enqueue at head */ enqueue_cache_item (ci, HEAD); - pthread_cond_signal (&cache_cond); pthread_cond_wait(&ci->flushed, &cache_lock); pthread_mutex_unlock(&cache_lock); @@ -1135,7 +1135,6 @@ static int handle_request_update (int fd, /* {{{ */ && (ci->values_num > 0)) { enqueue_cache_item (ci, TAIL); - pthread_cond_signal (&cache_cond); } pthread_mutex_unlock (&cache_lock); -- 2.30.2