Remove useless cancellation token source

This commit is contained in:
Jack251970 2025-03-22 10:10:52 +08:00
parent b71e7226e5
commit 5b29dedcbe

View file

@ -30,7 +30,6 @@ namespace Flow.Launcher
#region Public Properties #region Public Properties
public static IPublicAPI API { get; private set; } public static IPublicAPI API { get; private set; }
public static CancellationTokenSource NativeThreadCTS { get; private set; }
#endregion #endregion
@ -121,8 +120,6 @@ namespace Flow.Launcher
[STAThread] [STAThread]
public static void Main() public static void Main()
{ {
NativeThreadCTS = new CancellationTokenSource();
if (SingleInstance<App>.InitializeAsFirstInstance()) if (SingleInstance<App>.InitializeAsFirstInstance())
{ {
var application = new App(); var application = new App();
@ -251,7 +248,6 @@ namespace Flow.Launcher
Current.Exit += async (s, e) => Current.Exit += async (s, e) =>
{ {
NativeThreadCTS.Cancel();
Log.Info("|App.RegisterExitEvents|Application Exit"); Log.Info("|App.RegisterExitEvents|Application Exit");
await DisposeAsync(); await DisposeAsync();
}; };