mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 14:45:42 +08:00
refs #784 The data cache worker thread could interfere with performance measurements,
so only run it in applications that start the main event loop.
This commit is contained in:
committed by
Klaus Basan
parent
f4982ffbc4
commit
5d7289adb3
@@ -87,9 +87,8 @@ namespace BlackMisc
|
|||||||
|
|
||||||
if (! QFile::exists(m_revisionFileName)) { QFile(m_revisionFileName).open(QFile::WriteOnly); }
|
if (! QFile::exists(m_revisionFileName)) { QFile(m_revisionFileName).open(QFile::WriteOnly); }
|
||||||
m_watcher.addPath(m_revisionFileName);
|
m_watcher.addPath(m_revisionFileName);
|
||||||
m_serializer.start();
|
|
||||||
m_serializer.loadFromStore({}, false, true); // load pinned values
|
m_serializer.loadFromStore({}, false, true); // load pinned values
|
||||||
loadFromStoreAsync();
|
QTimer::singleShot(0, this, [this] { m_serializer.start(); loadFromStoreAsync(); }); // only start the serializer if the main thread event loop runs
|
||||||
}
|
}
|
||||||
|
|
||||||
CDataCache *CDataCache::instance()
|
CDataCache *CDataCache::instance()
|
||||||
|
|||||||
Reference in New Issue
Block a user