Browse Source

DaNike told me to make this Task LongRunning

pull/65/head
Meivyn 2 years ago
parent
commit
d2735d0def
No known key found for this signature in database GPG Key ID: 8BDD3E48158B2F71
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      IPA.Loader/Loader/PluginLoader.cs

+ 4
- 3
IPA.Loader/Loader/PluginLoader.cs View File

@ -13,6 +13,7 @@ using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Diagnostics; using System.Diagnostics;
using System.Threading.Tasks;
using IPA.AntiMalware; using IPA.AntiMalware;
using Hive.Versioning; using Hive.Versioning;
#if NET4 #if NET4
@ -37,7 +38,7 @@ namespace IPA.Loader
internal static PluginMetadata SelfMeta = null!; internal static PluginMetadata SelfMeta = null!;
internal static Task LoadTask() => internal static Task LoadTask() =>
TaskEx.Run(() =>
Task.Factory.StartNew(() =>
{ {
YeetIfNeeded(); YeetIfNeeded();
@ -57,7 +58,7 @@ namespace IPA.Loader
sw.Stop(); sw.Stop();
Logger.Loader.Info($"Calculating load order took {sw.Elapsed}"); Logger.Loader.Info($"Calculating load order took {sw.Elapsed}");
});
}, TaskCreationOptions.LongRunning);
internal static void YeetIfNeeded() internal static void YeetIfNeeded()
{ {
@ -770,7 +771,7 @@ namespace IPA.Loader
&& range.Matches(meta.HVersion) && range.Matches(meta.HVersion)
&& !conflIgnored && !conflDisabled) // the conflict is only *actually* a problem if it is both not ignored and not disabled && !conflIgnored && !conflDisabled) // the conflict is only *actually* a problem if it is both not ignored and not disabled
{ {
Logger.Loader.Warn($"Plugin '{plugin.Id}' conflicts with {meta.Id}@{meta.HVersion}; ignoring '{plugin.Id}'"); Logger.Loader.Warn($"Plugin '{plugin.Id}' conflicts with {meta.Id}@{meta.HVersion}; ignoring '{plugin.Id}'");
ignoredPlugins.Add(plugin, new(Reason.Conflict) ignoredPlugins.Add(plugin, new(Reason.Conflict)
{ {


Loading…
Cancel
Save