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 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();
}, 10, true);
framesWaitedEvent.Wait(1000);
if (!framesWaitedEvent.Wait(1000))
throw new TimeoutException("Screenshot data did not arrive in a timely fashion");
waitDelegate.Cancel();
}
}