From b7c739b0ddb95ef274d141a6fe714fb34291324d Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 13 Sep 2011 16:21:12 +0200 Subject: [PATCH] use pthread_cond_signal() to make sure the background thread will process the job. --- src/bio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bio.c b/src/bio.c index b525afb7..5ff5b1c8 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); }