From a8daa2d683be1f19cf9bf5c16544b17dcad7eb91 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Thu, 8 Nov 2018 10:45:53 -0800 Subject: [PATCH] Signal before unlocking in pool.c --- lib/common/pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/pool.c b/lib/common/pool.c index 281b3824..7a829454 100644 --- a/lib/common/pool.c +++ b/lib/common/pool.c @@ -88,8 +88,8 @@ static void* POOL_thread(void* opaque) { ctx->numThreadsBusy++; ctx->queueEmpty = ctx->queueHead == ctx->queueTail; /* Unlock the mutex, signal a pusher, and run the job */ - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); ZSTD_pthread_cond_signal(&ctx->queuePushCond); + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); job.function(job.opaque);