mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 08:03:52 +09:00
Catch OperationCanceledException in single file load sequence
This commit is contained in:
@ -504,7 +504,16 @@ namespace osu.Game
|
|||||||
// schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached).
|
// schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached).
|
||||||
// with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile,
|
// with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile,
|
||||||
// we could avoid the need for scheduling altogether.
|
// we could avoid the need for scheduling altogether.
|
||||||
Schedule(() => { asyncLoadStream = asyncLoadStream?.ContinueWith(t => LoadComponentAsync(d, add).Wait()) ?? LoadComponentAsync(d, add); });
|
Schedule(() => { asyncLoadStream = asyncLoadStream?.ContinueWith(async t =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await LoadComponentAsync(d, add);
|
||||||
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}) ?? LoadComponentAsync(d, add); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool OnPressed(GlobalAction action)
|
public bool OnPressed(GlobalAction action)
|
||||||
|
Reference in New Issue
Block a user