summaryrefslogtreecommitdiff
path: root/src/bio.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-09-13 16:21:12 +0200
committerantirez <antirez@gmail.com>2011-09-13 16:21:12 +0200
commitb7c739b0ddb95ef274d141a6fe714fb34291324d (patch)
tree774ccd08fcf3acbea25b195bdf05efc11ddfa578 /src/bio.c
parent8ea2dfd75c962865ee73cdb5d1893b9a64212b27 (diff)
downloadredis-b7c739b0ddb95ef274d141a6fe714fb34291324d.tar.gz
use pthread_cond_signal() to make sure the background thread will process the job.
Diffstat (limited to 'src/bio.c')
-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);
}