Avoid race condition when waking worker thread

PR #19005.
This commit is contained in:
Vladimir Golovnev 2023-05-23 02:22:16 +03:00 committed by GitHub
commit a59301712e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -703,8 +703,8 @@ void BitTorrent::DBResumeDataStorage::Worker::run()
void DBResumeDataStorage::Worker::requestInterruption() void DBResumeDataStorage::Worker::requestInterruption()
{ {
m_waitCondition.wakeAll();
QThread::requestInterruption(); QThread::requestInterruption();
m_waitCondition.wakeAll();
} }
void BitTorrent::DBResumeDataStorage::Worker::store(const TorrentID &id, const LoadTorrentParams &resumeData) void BitTorrent::DBResumeDataStorage::Worker::store(const TorrentID &id, const LoadTorrentParams &resumeData)