mirror of
https://github.com/ppy/osu
synced 2025-02-17 19:07:07 +00:00
Mark several long-running tasks as long-running
This commit is contained in:
parent
89cc7b7945
commit
c765785d00
@ -106,7 +106,7 @@ namespace osu.Desktop
|
||||
var filePaths = new [] { e.FileName };
|
||||
|
||||
if (filePaths.All(f => Path.GetExtension(f) == @".osz"))
|
||||
Task.Run(() => BeatmapManager.Import(filePaths));
|
||||
Task.Factory.StartNew(() => BeatmapManager.Import(filePaths), TaskCreationOptions.LongRunning);
|
||||
else if (filePaths.All(f => Path.GetExtension(f) == @".osr"))
|
||||
Task.Run(() =>
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ namespace osu.Game.Beatmaps
|
||||
PostNotification?.Invoke(downloadNotification);
|
||||
|
||||
// don't run in the main api queue as this is a long-running task.
|
||||
Task.Run(() => request.Perform(api));
|
||||
Task.Factory.StartNew(() => request.Perform(api), TaskCreationOptions.LongRunning);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
Action = () =>
|
||||
{
|
||||
importButton.Enabled.Value = false;
|
||||
Task.Run(() => beatmaps.ImportFromStable()).ContinueWith(t => Schedule(() => importButton.Enabled.Value = true));
|
||||
Task.Factory.StartNew(beatmaps.ImportFromStable)
|
||||
.ContinueWith(t => Schedule(() => importButton.Enabled.Value = true), TaskContinuationOptions.LongRunning);
|
||||
}
|
||||
},
|
||||
deleteButton = new SettingsButton
|
||||
|
Loading…
Reference in New Issue
Block a user