diff --git a/HellionChat/Util/AutoTranslate.cs b/HellionChat/Util/AutoTranslate.cs index e0a940c..fa4e0b5 100644 --- a/HellionChat/Util/AutoTranslate.cs +++ b/HellionChat/Util/AutoTranslate.cs @@ -54,15 +54,21 @@ internal static class AutoTranslate } // Warms the auto-translate cache on a background thread so the first - // message send doesn't hitch the main thread. + // message send doesn't hitch the main thread. IsBackground keeps plugin + // unload non-blocking even if the warmup is still in flight. internal static void PreloadCache() { - new Thread(() => + var thread = new Thread(() => { var sw = Stopwatch.StartNew(); AllEntries(); Plugin.Log.Debug($"Warming up auto-translate took {sw.ElapsedMilliseconds}ms"); - }).Start(); + }) + { + IsBackground = true, + Name = "HellionChat-AutoTranslate-Warmup", + }; + thread.Start(); } private static List AllEntries()