mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Merge branch 'master' into fix-startup-webrequests
This commit is contained in:
commit
2ff48da5af
@ -506,22 +506,24 @@ namespace osu.Game
|
|||||||
// we could avoid the need for scheduling altogether.
|
// we could avoid the need for scheduling altogether.
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
if (asyncLoadStream != null)
|
var previousLoadStream = asyncLoadStream;
|
||||||
|
|
||||||
|
//chain with existing load stream
|
||||||
|
asyncLoadStream = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
//chain with existing load stream
|
if (previousLoadStream != null)
|
||||||
asyncLoadStream = asyncLoadStream.ContinueWith(async t =>
|
await previousLoadStream;
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try
|
Logger.Log($"Loading {d}...", LoggingTarget.Debug);
|
||||||
{
|
await LoadComponentAsync(d, add);
|
||||||
await LoadComponentAsync(d, add);
|
Logger.Log($"Loaded {d}!", LoggingTarget.Debug);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else
|
|
||||||
asyncLoadStream = LoadComponentAsync(d, add);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user