From f0d3e8632e93c842267dfc04c737200a1e277e64 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Wed, 22 Jul 2020 21:51:46 +0300 Subject: [PATCH] Remove unwanted deadlock in timer --- components/common/cpp/src/timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/common/cpp/src/timer.cpp b/components/common/cpp/src/timer.cpp index 0efe52092..2ef443241 100644 --- a/components/common/cpp/src/timer.cpp +++ b/components/common/cpp/src/timer.cpp @@ -220,10 +220,10 @@ static void trigger_jobs() { // If last job in list then do in this thread if (active_jobs == jobs[kTimerMain].size()+1) { + lk.unlock(); bool doremove = !pj->job.trigger(ts); pj->active = false; active_jobs--; - lk.unlock(); if (doremove) removeJob(pj->id); lk.lock(); break; -- GitLab