1
0

cRoot::SaveAllChunks() doesn't wait for the save (deadlocks).

Rather, it only queues the save task onto each world's tick thread.
This commit is contained in:
madmaxoft 2013-11-15 10:13:32 +01:00
parent 6e5d7b70a1
commit 90fc51c4d0
2 changed files with 2 additions and 2 deletions

View File

@ -1976,7 +1976,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
GetWebAdmin = { Params = "", Return = "{{cWebAdmin|cWebAdmin}}", Notes = "Returns the cWebAdmin object." },
GetWorld = { Params = "WorldName", Return = "{{cWorld|cWorld}}", Notes = "Returns the cWorld object of the given world. It returns nil if there is no world with the given name." },
QueueExecuteConsoleCommand = { Params = "Message", Return = "", Notes = "Queues a console command for execution through the cServer class. The command will be executed in the tick thread. The command's output will be sent to console." },
SaveAllChunks = { Params = "", Return = "", Notes = "Saves all the chunks in all the worlds." },
SaveAllChunks = { Params = "", Return = "", Notes = "Saves all the chunks in all the worlds. Note that the saving is queued on each world's tick thread and this functions returns before the chunks are actually saved." },
SetPrimaryServerVersion = { Params = "Protocol Version", Return = "", Notes = "Sets the servers PrimaryServerVersion to the given protocol number." }
},
Constants =

View File

@ -489,7 +489,7 @@ void cRoot::SaveAllChunks(void)
{
for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr)
{
itr->second->SaveAllChunks();
itr->second->QueueSaveAllChunks();
}
}