use pthread_cond_signal() to make sure the background thread will process the job.

This commit is contained in:
antirez 2011-09-13 16:21:12 +02:00
parent 8ea2dfd75c
commit b7c739b0dd

View File

@ -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);
}