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:
Mathew Sutcliffe
2016-10-19 00:14:51 +01:00
committed by Klaus Basan
parent f4982ffbc4
commit 5d7289adb3

View File

@@ -87,9 +87,8 @@ namespace BlackMisc
if (! QFile::exists(m_revisionFileName)) { QFile(m_revisionFileName).open(QFile::WriteOnly); }
m_watcher.addPath(m_revisionFileName);
m_serializer.start();
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()