use pthread_cond_signal() to make sure the background thread will process the job.
This commit is contained in:
parent
9c24b5fb6b
commit
f8a6b4bd02
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user