Commit b7c739b0 authored by antirez's avatar antirez
Browse files

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

parent 8ea2dfd7
...@@ -72,6 +72,7 @@ void bioCreateBackgroundJob(int type, void *data) { ...@@ -72,6 +72,7 @@ void bioCreateBackgroundJob(int type, void *data) {
job->data = data; job->data = data;
pthread_mutex_lock(&bio_mutex); pthread_mutex_lock(&bio_mutex);
listAddNodeTail(bio_jobs,job); listAddNodeTail(bio_jobs,job);
pthread_cond_signal(&bio_condvar);
pthread_mutex_unlock(&bio_mutex); pthread_mutex_unlock(&bio_mutex);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment