From b40c1311b6d5379e58a0065b4b294b59e7733f28 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Tue, 20 Dec 2016 19:42:53 -0500 Subject: [PATCH] Locking bug --- libretro-common/queues/task_queue.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index 90675980ee..81cd71916a 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -433,14 +433,11 @@ static void threaded_worker(void *userdata) continue; } + task_queue_remove(&tasks_running, task); slock_unlock(running_lock); task->handler(task); - slock_lock(running_lock); - task_queue_remove(&tasks_running, task); - slock_unlock(running_lock); - /* Update queue */ if (!task->finished) {