1
0

Fixed a deadlock in WorldStorage

git-svn-id: http://mc-server.googlecode.com/svn/trunk@265 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth 2012-02-15 21:35:59 +00:00
parent 01341e2788
commit 5958478c59

View File

@ -78,9 +78,11 @@ void cWorldStorage::WaitForFinish(void)
{ {
LOG("Waiting for the world storage to finish saving"); LOG("Waiting for the world storage to finish saving");
// Cancel all loading requests: {
cCSLock Lock(m_CSLoadQueue); // Cancel all loading requests:
m_LoadQueue.clear(); cCSLock Lock(m_CSLoadQueue);
m_LoadQueue.clear();
}
// Wait for the thread to finish: // Wait for the thread to finish:
mShouldTerminate = true; mShouldTerminate = true;