From: Nick Terrell Date: Thu, 8 Nov 2018 18:45:53 +0000 (-0800) Subject: Signal before unlocking in pool.c X-Git-Tag: v1.3.8~53^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8daa2d683be1f19cf9bf5c16544b17dcad7eb91;p=thirdparty%2Fzstd.git Signal before unlocking in pool.c --- diff --git a/lib/common/pool.c b/lib/common/pool.c index 281b3824a..7a8294543 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);