diff options
author | youjiali1995 <zlwgx1023@gmail.com> | 2018-09-05 16:51:13 +0800 |
---|---|---|
committer | youjiali1995 <zlwgx1023@gmail.com> | 2018-09-05 16:51:13 +0800 |
commit | c328834832808cf8be9c30122a48b8234ebebed1 (patch) | |
tree | 52f50bd895f804199a77b10eb8c82cf414e4aee2 /src/bio.c | |
parent | 4e5e0d3719ffed0d3a687fa2082655f97e16167c (diff) | |
download | redis-c328834832808cf8be9c30122a48b8234ebebed1.tar.gz |
bio: fix bioWaitStepOfType.
Diffstat (limited to 'src/bio.c')
-rw-r--r-- | src/bio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -204,14 +204,14 @@ void *bioProcessBackgroundJobs(void *arg) { } 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 * jobs to process we'll block again in pthread_cond_wait(). */ pthread_mutex_lock(&bio_mutex[type]); listDelNode(bio_jobs[type],ln); bio_pending[type]--; + + /* Unblock threads blocked on bioWaitStepOfType() if any. */ + pthread_cond_broadcast(&bio_step_cond[type]); } } |