mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00: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 osu.Game.Screens.Menu;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Platform;
|
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