From cf5a807bc69d6ab0d4ab13eee41c228f4ef13b8d Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Wed, 24 Oct 2018 22:34:06 +0100 Subject: [PATCH] Ref T405 Follow-up: mutex needs to remain locked when signal is emitted, to guarantee continuations are called only once when worker finishes. --- src/blackmisc/worker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackmisc/worker.h b/src/blackmisc/worker.h index 4a27e2143..abea2166a 100644 --- a/src/blackmisc/worker.h +++ b/src/blackmisc/worker.h @@ -170,6 +170,7 @@ namespace BlackMisc void aboutToStart(); //! Emitted when the task is finished. + //! \note Slots connected to this signal may not call any methods that observe the worker's finished flag. void finished(); protected: @@ -188,7 +189,6 @@ namespace BlackMisc { QMutexLocker lock(&m_finishedMutex); m_finished = true; - lock.unlock(); emit finished(); }