mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Revert "Move final result set firing to before the update realm is disposed"
This reverts commit 24bcba6418
.
This commit is contained in:
parent
24bcba6418
commit
11f0f3c17d
@ -604,18 +604,20 @@ namespace osu.Game.Database
|
||||
|
||||
Logger.Log(@"Blocking realm operations.", LoggingTarget.Database);
|
||||
|
||||
// Force a flush of any pending callbacks in the synchronization context.
|
||||
// We want to ensure that the empty set callbacks are the last thing to arrive.
|
||||
syncContext?.Send(_ =>
|
||||
{
|
||||
foreach (var action in notificationsResetMap.Values)
|
||||
action();
|
||||
}, null);
|
||||
|
||||
updateRealm?.Dispose();
|
||||
updateRealm = null;
|
||||
}
|
||||
|
||||
// In order to ensure events arrive in the correct order, these *must* be fired post disposal of the update realm,
|
||||
// and must be posted to the synchronization context.
|
||||
// This is because realm may fire event callbacks between the `unregisterAllSubscriptions` and `updateRealm.Dispose`
|
||||
// calls above.
|
||||
syncContext?.Send(_ =>
|
||||
{
|
||||
foreach (var action in notificationsResetMap.Values)
|
||||
action();
|
||||
}, null);
|
||||
|
||||
const int sleep_length = 200;
|
||||
int timeout = 5000;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user