More race conditions.
This commit is contained in:
parent
061169633d
commit
718764e533
3 changed files with 8 additions and 12 deletions
|
|
@ -68,9 +68,13 @@ namespace TShockAPI
|
|||
Directory.CreateDirectory(worldpath);
|
||||
|
||||
Tools.Broadcast("Server map saving, potential lag spike");
|
||||
Console.WriteLine("Backing up world...");
|
||||
Thread SaveWorld = new Thread(Tools.SaveWorld);
|
||||
SaveWorld.Start();
|
||||
|
||||
while (SaveWorld.ThreadState == ThreadState.Running)
|
||||
Thread.Sleep(50);
|
||||
|
||||
Main.worldPathName = worldname;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue