mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 22:22:59 +08:00
Rename and xmldoc RealmResetEmptySet
This commit is contained in:
parent
48dacd1c15
commit
d836dba982
@ -44,7 +44,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
if (changes == null)
|
if (changes == null)
|
||||||
{
|
{
|
||||||
if (sender is EmptyRealmSet<BeatmapSetInfo>)
|
if (sender is RealmResetEmptySet<BeatmapSetInfo>)
|
||||||
{
|
{
|
||||||
// Usually we'd reset stuff here, but doing so triggers a silly flow which ends up deadlocking realm.
|
// Usually we'd reset stuff here, but doing so triggers a silly flow which ends up deadlocking realm.
|
||||||
// Additionally, user should not be at song select when realm is blocking all operations in the first place.
|
// Additionally, user should not be at song select when realm is blocking all operations in the first place.
|
||||||
|
@ -568,7 +568,7 @@ namespace osu.Game.Database
|
|||||||
lock (notificationsResetMap)
|
lock (notificationsResetMap)
|
||||||
{
|
{
|
||||||
// Store an action which is used when blocking to ensure consumers don't use results of a stale changeset firing.
|
// Store an action which is used when blocking to ensure consumers don't use results of a stale changeset firing.
|
||||||
notificationsResetMap.Add(action, () => callback(new EmptyRealmSet<T>(), null));
|
notificationsResetMap.Add(action, () => callback(new RealmResetEmptySet<T>(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
return RegisterCustomSubscription(action);
|
return RegisterCustomSubscription(action);
|
||||||
|
@ -12,7 +12,13 @@ using Realms.Schema;
|
|||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public class EmptyRealmSet<T> : IRealmCollection<T>
|
/// <summary>
|
||||||
|
/// This can arrive in <see cref="RealmAccess.RegisterForNotifications{T}"/> callbacks to imply that realm access has been reset.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Usually implies that the original database may return soon and the callback can usually be silently ignored.
|
||||||
|
///</remarks>
|
||||||
|
public class RealmResetEmptySet<T> : IRealmCollection<T>
|
||||||
{
|
{
|
||||||
private IList<T> emptySet => Array.Empty<T>();
|
private IList<T> emptySet => Array.Empty<T>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user