mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
bio: fix bioWaitStepOfType.
This commit is contained in:
parent
4e5e0d3719
commit
c328834832
@ -204,14 +204,14 @@ void *bioProcessBackgroundJobs(void *arg) {
|
|||||||
}
|
}
|
||||||
zfree(job);
|
zfree(job);
|
||||||
|
|
||||||
/* Unblock threads blocked on bioWaitStepOfType() if any. */
|
|
||||||
pthread_cond_broadcast(&bio_step_cond[type]);
|
|
||||||
|
|
||||||
/* Lock again before reiterating the loop, if there are no longer
|
/* Lock again before reiterating the loop, if there are no longer
|
||||||
* jobs to process we'll block again in pthread_cond_wait(). */
|
* jobs to process we'll block again in pthread_cond_wait(). */
|
||||||
pthread_mutex_lock(&bio_mutex[type]);
|
pthread_mutex_lock(&bio_mutex[type]);
|
||||||
listDelNode(bio_jobs[type],ln);
|
listDelNode(bio_jobs[type],ln);
|
||||||
bio_pending[type]--;
|
bio_pending[type]--;
|
||||||
|
|
||||||
|
/* Unblock threads blocked on bioWaitStepOfType() if any. */
|
||||||
|
pthread_cond_broadcast(&bio_step_cond[type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user