mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Add explanatory comments
This commit is contained in:
@ -133,6 +133,9 @@ namespace osu.Game.Database
|
|||||||
Task.Factory.StartNew(() =>
|
Task.Factory.StartNew(() =>
|
||||||
{
|
{
|
||||||
realm.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.realm"), realmBlockOperations);
|
realm.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.realm"), realmBlockOperations);
|
||||||
|
|
||||||
|
// Above call will dispose of the blocking token when done.
|
||||||
|
// Clean up here so we don't accidentally dispose twice.
|
||||||
realmBlockOperations = null;
|
realmBlockOperations = null;
|
||||||
|
|
||||||
efContextFactory.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.db"));
|
efContextFactory.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.db"));
|
||||||
@ -220,6 +223,7 @@ namespace osu.Game.Database
|
|||||||
// If we were to not do this, the migration would run another time the next time the user starts the game.
|
// If we were to not do this, the migration would run another time the next time the user starts the game.
|
||||||
deletePreRealmData();
|
deletePreRealmData();
|
||||||
|
|
||||||
|
// If something went wrong and the disposal token wasn't invoked above, ensure it is here.
|
||||||
realmBlockOperations?.Dispose();
|
realmBlockOperations?.Dispose();
|
||||||
|
|
||||||
migrationCompleted.SetResult(true);
|
migrationCompleted.SetResult(true);
|
||||||
|
Reference in New Issue
Block a user