More race conditions.

This commit is contained in:
Deathmax 2011-07-04 17:32:49 +08:00
parent 061169633d
commit 718764e533
3 changed files with 8 additions and 12 deletions

View file

@ -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)