Skip to content

Commit

Permalink
use pthread_cond_signal() to make sure the background thread will pro…
Browse files Browse the repository at this point in the history
…cess the job.
  • Loading branch information
antirez committed Sep 14, 2011
1 parent 5ca7575 commit c8d0013
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bio.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit c8d0013

Please sign in to comment.