this is broken but proves where our race condition comes from

This commit is contained in:
DarthArgus
2016-12-09 22:30:25 +00:00
parent 8834b81283
commit fd73109f03
@@ -346,18 +346,23 @@ void Persister::startSave(void)
m_currentSnapshots.begin()->second->takeTimestamp();
// queue up snapshots to be saved
m_savingDeleting_mtx.lock();
ServerSnapshotMap::iterator i;
for (i=m_currentSnapshots.begin(); i!=m_currentSnapshots.end(); ++i)
{
m_savingSnapshots.push_back(i->second);
taskQueue->asyncRequest(new TaskSaveSnapshot(i->second));
}
for (i=m_newObjectSnapshots.begin(); i!=m_newObjectSnapshots.end(); ++i)
{
m_savingSnapshots.push_back(i->second);
taskQueue->asyncRequest(new TaskSaveSnapshot(i->second));
}
m_savingDeleting_mtx.unlock();
// nothing changed so send a complete message for the shutdown process
if( m_savingSnapshots.empty() )
{