summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-09-13 16:21:12 +0200
committerantirez <antirez@gmail.com>2011-09-14 10:47:53 +0200
commitc8d0013f3847434ca47b69b6a85db7ca885ba991 (patch)
treefac4fbe3d741b1fd945cececd6d0a79a8c8fc5ab
parent5ca75751ed0ff6d37f52b2ff9c9ebc43b5459b00 (diff)
downloadredis-c8d0013f3847434ca47b69b6a85db7ca885ba991.tar.gz
use pthread_cond_signal() to make sure the background thread will process the job.
-rw-r--r--src/bio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bio.c b/src/bio.c
index b525afb76..5ff5b1c85 100644
--- a/src/bio.c
+++ b/src/bio.c
@@ -72,6 +72,7 @@ void bioCreateBackgroundJob(int type, void *data) {
job->data = data;
pthread_mutex_lock(&bio_mutex);
listAddNodeTail(bio_jobs,job);
+ pthread_cond_signal(&bio_condvar);
pthread_mutex_unlock(&bio_mutex);
}