1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-26 04:43:01 +08:00

Throw on Wait failure in a few remaining cases

This commit is contained in:
Dean Herbert 2022-06-23 15:28:20 +09:00
parent 7ef8b7df5f
commit 51268d0cc8
2 changed files with 8 additions and 2 deletions

View File

@ -209,6 +209,10 @@ namespace osu.Game.Database
public void SetMigrationCompletion() => migrationComplete.Set(); public void SetMigrationCompletion() => migrationComplete.Set();
public void WaitForMigrationCompletion() => migrationComplete.Wait(300000); public void WaitForMigrationCompletion()
{
if (!migrationComplete.Wait(300000))
throw new TimeoutException("Migration took too long (likely stuck).");
}
} }
} }

View File

@ -103,7 +103,9 @@ namespace osu.Game.Graphics
framesWaitedEvent.Set(); framesWaitedEvent.Set();
}, 10, true); }, 10, true);
framesWaitedEvent.Wait(1000); if (!framesWaitedEvent.Wait(1000))
throw new TimeoutException("Screenshot data did not arrive in a timely fashion");
waitDelegate.Cancel(); waitDelegate.Cancel();
} }
} }