mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #646 Fixed race condition between synchronize() and saveToStoreAsync().
This commit is contained in:
@@ -405,6 +405,8 @@ namespace BlackMisc
|
||||
|
||||
void CDataCacheRevision::notifyPendingWrite()
|
||||
{
|
||||
QMutexLocker lock(&m_mutex);
|
||||
|
||||
m_pendingWrite = true;
|
||||
}
|
||||
|
||||
@@ -420,7 +422,7 @@ namespace BlackMisc
|
||||
{
|
||||
QMutexLocker lock(&m_mutex);
|
||||
|
||||
return (m_updateInProgress || beginUpdate({{ key, timestamp }}, false)) && m_timestamps.contains(key);
|
||||
return (m_updateInProgress || m_pendingWrite || beginUpdate({{ key, timestamp }}, false)) && m_timestamps.contains(key);
|
||||
}
|
||||
|
||||
std::future<void> CDataCacheRevision::promiseLoadedValue(const QString &key, qint64 currentTimestamp)
|
||||
|
||||
Reference in New Issue
Block a user