1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Add comment regarding the reasoning for encapsulating the task in another

This commit is contained in:
Dean Herbert 2020-12-14 18:03:01 +09:00
parent f3e6c586f7
commit c5112edd08

View File

@ -429,8 +429,11 @@ namespace osu.Game
public override Task Import(Stream stream, string filename)
{
// encapsulate task as we don't want to begin the import process until in a ready state.
var importTask = new Task(async () => await base.Import(stream, filename));
waitForReady(() => this, _ => importTask.Start());
return importTask;
}