fix: Fixes race condition with world save snapshot request (#2104)
### Summary * Fixes a race condition where the snapshot path isn't between the request snapshot being set on a background thread, and the main loop consuming that flag. Closes #2102
This commit is contained in:
parent
019672b026
commit
717a1a062e
2 changed files with 7 additions and 1 deletions
|
|
@ -517,10 +517,11 @@ public static class Core
|
|||
DoKill(_restartOnKill);
|
||||
}
|
||||
|
||||
// This is generally called from background threads during Preserialize
|
||||
internal static void RequestSnapshot(string snapshotPath)
|
||||
{
|
||||
_performSnapshot = true;
|
||||
_snapshotPath = snapshotPath;
|
||||
_performSnapshot = true; // Set this after the path so race conditions do not occur
|
||||
}
|
||||
|
||||
public static void VerifySerialization()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue