mirror of
https://github.com/ppy/osu
synced 2024-12-25 00:02:48 +00:00
Throw on Wait
failure in a few remaining cases
This commit is contained in:
parent
7ef8b7df5f
commit
51268d0cc8
@ -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).");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user