mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Merge branch 'master' into realm-subscription-tracking
This commit is contained in:
@ -644,18 +644,19 @@ namespace osu.Game.Database
|
||||
}
|
||||
catch
|
||||
{
|
||||
realmRetrievalLock.Release();
|
||||
restoreOperation();
|
||||
throw;
|
||||
}
|
||||
|
||||
return new InvokeOnDisposal<RealmAccess>(this, factory =>
|
||||
{
|
||||
factory.realmRetrievalLock.Release();
|
||||
Logger.Log(@"Restoring realm operations.", LoggingTarget.Database);
|
||||
return new InvokeOnDisposal(restoreOperation);
|
||||
|
||||
void restoreOperation()
|
||||
{
|
||||
Logger.Log(@"Restoring realm operations.", LoggingTarget.Database);
|
||||
realmRetrievalLock.Release();
|
||||
// Post back to the update thread to revive any subscriptions.
|
||||
syncContext?.Post(_ => ensureUpdateRealm(), null);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/realm/realm-dotnet/blob/32f4ebcc88b3e80a3b254412665340cd9f3bd6b5/Realm/Realm/Extensions/ReflectionExtensions.cs#L46
|
||||
|
Reference in New Issue
Block a user