mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
fix for thread prevent process being closed (#21311)
This commit is contained in:
committed by
GitHub
parent
460f242967
commit
1ff5fa8794
@@ -60,7 +60,7 @@ namespace Hosts
|
||||
|
||||
UnhandledException += App_UnhandledException;
|
||||
|
||||
new Thread(() =>
|
||||
var cleanupBackupThread = new Thread(() =>
|
||||
{
|
||||
// Delete old backups only if running elevated
|
||||
if (!GetService<IElevationHelper>().IsElevated)
|
||||
@@ -76,7 +76,10 @@ namespace Hosts
|
||||
{
|
||||
Logger.LogError("Failed to delete backup", ex);
|
||||
}
|
||||
}).Start();
|
||||
});
|
||||
|
||||
cleanupBackupThread.IsBackground = true;
|
||||
cleanupBackupThread.Start();
|
||||
}
|
||||
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user