diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2018-09-07 12:06:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 12:06:02 +0200 |
commit | aba57a1bb7146063267ded6fbb3fd014546b855a (patch) | |
tree | 058bfa74afc586874409697d91d4e879fe8b266b | |
parent | 596749e75f0a3e541124a5c6df0952e1741c4fbd (diff) | |
parent | c328834832808cf8be9c30122a48b8234ebebed1 (diff) | |
download | redis-aba57a1bb7146063267ded6fbb3fd014546b855a.tar.gz |
Merge pull request #5324 from youjiali1995/fix-bio
bio: fix bioWaitStepOfType.
-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]); } } |