Ensure thread is stopped before deleting QThread

PR #18037.
This commit is contained in:
Vladimir Golovnev
2022-12-08 08:37:14 +03:00
committed by GitHub
parent 31c7306bd2
commit ac3ad17a9e
18 changed files with 134 additions and 76 deletions

View File

@@ -33,6 +33,7 @@
#include "base/bittorrent/addtorrentparams.h"
#include "base/path.h"
#include "base/utils/thread.h"
class QThread;
@@ -76,7 +77,6 @@ private slots:
private:
explicit TorrentFilesWatcher(QObject *parent = nullptr);
~TorrentFilesWatcher() override;
void initWorker();
void load();
@@ -89,7 +89,7 @@ private:
QHash<Path, WatchedFolderOptions> m_watchedFolders;
QThread *m_ioThread = nullptr;
Utils::Thread::UniquePtr m_ioThread;
class Worker;
Worker *m_asyncWorker = nullptr;