]> git.saurik.com Git - redis.git/blobdiff - src/bio.c
use pthread_cond_signal() to make sure the background thread will process the job.
[redis.git] / 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);
 }