]> git.saurik.com Git - redis.git/commitdiff
use pthread_cond_signal() to make sure the background thread will process the job.
authorantirez <antirez@gmail.com>
Tue, 13 Sep 2011 14:21:12 +0000 (16:21 +0200)
committerantirez <antirez@gmail.com>
Tue, 13 Sep 2011 14:21:12 +0000 (16:21 +0200)
src/bio.c

index b525afb762377bd23d0f7e4f7898fa8e21b1f920..5ff5b1c853f0ce5b75fcaa8fae57c801885bd734 100644 (file)
--- 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);
 }