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

@ -19,7 +19,7 @@ using System.IO;
namespace Server;
public interface ISerializable
public interface ISerializable : IGenericSerializable
{
// Should be serialized/deserialized with the index so it can be referenced by IGenericReader
DateTime Created { get; set; }
@ -48,7 +48,7 @@ public interface ISerializable
}
}
public void Serialize(ConcurrentQueue<Type> types)
void IGenericSerializable.Serialize(ConcurrentQueue<Type> types)
{
SaveBuffer ??= new BufferWriter(true, types);