WorkQueueThread: provide name and function at same time

This commit is contained in:
Scott Mansell
2023-02-04 15:56:27 +13:00
parent 6594532f10
commit 7c4fcc30a3
11 changed files with 16 additions and 15 deletions

View File

@ -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:

View File

@ -87,7 +87,7 @@ private:
// game path -> directories that track it
QMap<QString, QSet<QString>> m_tracked_files;
QVector<QString> m_tracked_paths;
Common::WorkQueueThread<Command> m_load_thread{"GameList Tracker"};
Common::WorkQueueThread<Command> m_load_thread;
UICommon::GameFileCache m_cache;
Common::Event m_cache_loaded_event;
Common::Event m_initial_games_emitted_event;