Move async call out of `using` to better define the flow of data

This commit is contained in:
Dean Herbert 2021-05-27 19:03:59 +09:00
parent 3e5de9e5a8
commit 37ef368738
1 changed files with 6 additions and 1 deletions

View File

@ -58,8 +58,13 @@ private void load()
if (storage.Exists(database_name))
{
List<BeatmapCollection> beatmapCollections;
using (var stream = storage.GetStream(database_name))
importCollections(readCollections(stream));
beatmapCollections = readCollections(stream);
// intentionally fire-and-forget async.
importCollections(beatmapCollections);
}
}