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:
parent
6e5d7b70a1
commit
90fc51c4d0
@ -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 =
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user