mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T292, Ref T285 avoid unnecessary calls of cache synchronize in DB readers
Rational: Normally calling synchronize multiple times does not matter. However, it can time out if the cache is in use (e.g. saving) and create an exception. This exception is just unwanted "noise".
This commit is contained in:
@@ -579,9 +579,9 @@ namespace BlackCore
|
||||
|
||||
void CModelDataReader::synchronizeCaches(CEntityFlags::Entity entities)
|
||||
{
|
||||
if (entities.testFlag(CEntityFlags::LiveryEntity)) { m_liveryCache.synchronize(); }
|
||||
if (entities.testFlag(CEntityFlags::ModelEntity)) { m_modelCache.synchronize(); }
|
||||
if (entities.testFlag(CEntityFlags::DistributorEntity)) { m_distributorCache.synchronize(); }
|
||||
if (entities.testFlag(CEntityFlags::LiveryEntity)) { if (m_syncedLiveryCache) { return; } m_syncedLiveryCache = true; m_liveryCache.synchronize(); }
|
||||
if (entities.testFlag(CEntityFlags::ModelEntity)) { if (m_syncedModelCache) { return; } m_syncedModelCache = true; m_modelCache.synchronize(); }
|
||||
if (entities.testFlag(CEntityFlags::DistributorEntity)) { if (m_syncedDistributorCache) { return; } m_syncedDistributorCache = true; m_distributorCache.synchronize(); }
|
||||
}
|
||||
|
||||
void CModelDataReader::admitCaches(CEntityFlags::Entity entities)
|
||||
|
||||
Reference in New Issue
Block a user