fix: Fixes serialization threading, moves world save to end of loop, and eliminates Parallel.ForEach. (#1530)

This commit is contained in:
Kamron Batman 2023-10-03 00:42:49 -07:00 committed by GitHub
parent e18115dd94
commit 1f0acddc46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 228 additions and 58 deletions

View file

@ -81,8 +81,10 @@ public abstract class Persistence
internal static void SerializeAll()
{
// TODO: Hand off to a scheduler
Parallel.ForEach(_registry, p => p.Serialize());
foreach (var p in _registry)
{
p.Serialize();
}
}
internal static void PostSerializeAll()