mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T405 Follow-up: mutex needs to remain locked when signal is emitted,
to guarantee continuations are called only once when worker finishes.
This commit is contained in:
committed by
Klaus Basan
parent
00c5e989d2
commit
cf5a807bc6
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user