From cdb66baf1662fdb18f73b30a0047fbcf8b3b7b9d Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Wed, 27 May 2015 17:30:42 +0300 Subject: [PATCH] Fix mutex being unlocked twice. --- src/threadqueue.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/threadqueue.c b/src/threadqueue.c index e8180c4a..eaad97d6 100644 --- a/src/threadqueue.c +++ b/src/threadqueue.c @@ -107,7 +107,6 @@ static void* threadqueue_worker(void* threadqueue_worker_spec_opaque) { //Find a task (should be fast enough) job = NULL; if (next_job) { - PTHREAD_LOCK(&next_job->lock); assert(next_job->ndepends == 0); job = next_job; } else { @@ -146,8 +145,6 @@ static void* threadqueue_worker(void* threadqueue_worker_spec_opaque) { ++threadqueue->queue_running; } - //We can unlock the job here, since fptr and arg are constant - PTHREAD_UNLOCK(&job->lock); //Unlock the queue PTHREAD_UNLOCK(&threadqueue->lock);