mirror of
https://github.com/ppy/osu
synced 2025-01-20 04:50:50 +00:00
Send
unsubscribe actions to synchronization context for consistency and safety
This commit is contained in:
parent
4fe3d83fc4
commit
5ea781faef
@ -300,7 +300,7 @@ namespace osu.Game.Database
|
|||||||
return new InvokeOnDisposal(() =>
|
return new InvokeOnDisposal(() =>
|
||||||
{
|
{
|
||||||
if (ThreadSafety.IsUpdateThread)
|
if (ThreadSafety.IsUpdateThread)
|
||||||
unsubscribe();
|
syncContext.Send(_ => unsubscribe(), null);
|
||||||
else
|
else
|
||||||
syncContext.Post(_ => unsubscribe(), null);
|
syncContext.Post(_ => unsubscribe(), null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user