mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 06:36:05 +08:00
Fix potential deadlock during gameplay tests
This commit is contained in:
parent
101f207040
commit
2e4adc056f
@ -123,6 +123,10 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public void Restart()
|
public void Restart()
|
||||||
{
|
{
|
||||||
|
// The Reset() call below causes speed adjustments to be reset in an async context, leading to deadlocks.
|
||||||
|
// The deadlock can be prevented by resetting the track synchronously before entering the async context.
|
||||||
|
track.ResetSpeedAdjustments();
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
track.Reset();
|
track.Reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user