mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-14 23:07:48 -04:00
this is broken but proves where our race condition comes from
This commit is contained in:
@@ -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() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user