mirror of
https://github.com/ppy/osu
synced 2024-12-13 10:28:17 +00:00
Fix import after direct download being scheduled to update thread
Caused a stall as experienced in #1364.
This commit is contained in:
parent
c765785d00
commit
040fa3aa15
@ -246,9 +246,13 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
downloadNotification.State = ProgressNotificationState.Completed;
|
||||
|
||||
using (var stream = new MemoryStream(data))
|
||||
using (var archive = new OszArchiveReader(stream))
|
||||
Import(archive);
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
// This gets scheduled back to the update thread, but we want the import to run in the background.
|
||||
using (var stream = new MemoryStream(data))
|
||||
using (var archive = new OszArchiveReader(stream))
|
||||
Import(archive);
|
||||
}, TaskCreationOptions.LongRunning);
|
||||
|
||||
currentDownloads.Remove(request);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user