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:
parent
7ef8b7df5f
commit
51268d0cc8
@ -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).");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user