mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Add thread safety
This commit is contained in:
parent
6f5f4f76e5
commit
96e4518e60
@ -16,6 +16,7 @@ using osu.Game.Screens;
|
||||
using osu.Game.Screens.Menu;
|
||||
using OpenTK;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Platform;
|
||||
@ -306,9 +307,9 @@ namespace osu.Game
|
||||
});
|
||||
}
|
||||
|
||||
recentErrorCount++;
|
||||
Interlocked.Increment(ref recentErrorCount);
|
||||
|
||||
Scheduler.AddDelayed(() => recentErrorCount--, debounce);
|
||||
Scheduler.AddDelayed(() => Interlocked.Decrement(ref recentErrorCount), debounce);
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user