mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Merge pull request #11539 from phire/improve_workqueuethread
Various WorkQueueThread improvements
This commit is contained in:
@ -37,7 +37,7 @@ GameTracker::GameTracker(QObject* parent) : QFileSystemWatcher(parent)
|
||||
|
||||
connect(qApp, &QApplication::aboutToQuit, this, [this] {
|
||||
m_processing_halted = true;
|
||||
m_load_thread.Cancel();
|
||||
m_load_thread.Shutdown(true);
|
||||
});
|
||||
connect(this, &QFileSystemWatcher::directoryChanged, this, &GameTracker::UpdateDirectory);
|
||||
connect(this, &QFileSystemWatcher::fileChanged, this, &GameTracker::UpdateFile);
|
||||
@ -55,7 +55,7 @@ GameTracker::GameTracker(QObject* parent) : QFileSystemWatcher(parent)
|
||||
m_load_thread.EmplaceItem(Command{CommandType::UpdateMetadata, {}});
|
||||
});
|
||||
|
||||
m_load_thread.Reset([this](Command command) {
|
||||
m_load_thread.Reset("GameList Tracker", [this](Command command) {
|
||||
switch (command.type)
|
||||
{
|
||||
case CommandType::LoadCache:
|
||||
@ -203,7 +203,7 @@ void GameTracker::RemoveDirectory(const QString& dir)
|
||||
void GameTracker::RefreshAll()
|
||||
{
|
||||
m_processing_halted = true;
|
||||
m_load_thread.Clear();
|
||||
m_load_thread.Cancel();
|
||||
m_load_thread.EmplaceItem(Command{CommandType::ResumeProcessing, {}});
|
||||
|
||||
if (m_needs_purge)
|
||||
|
Reference in New Issue
Block a user