1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Use daemon flag for threads, not setDaemon()

This commit is contained in:
Athanasius 2022-03-18 09:55:03 +00:00
parent 9f08b003c5
commit 3a78daf66c
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -1672,15 +1672,19 @@ class AppWindow(object):
def exit_tray(self, systray: 'SysTrayIcon') -> None:
"""Tray icon is shutting down."""
exit_thread = threading.Thread(target=self.onexit)
exit_thread.setDaemon(True)
exit_thread = threading.Thread(
target=self.onexit,
daemon=True,
)
exit_thread.start()
def onexit(self, event=None) -> None:
"""Application shutdown procedure."""
if sys.platform == 'win32':
shutdown_thread = threading.Thread(target=self.systray.shutdown)
shutdown_thread.setDaemon(True)
shutdown_thread = threading.Thread(
target=self.systray.shutdown,
daemon=True,
)
shutdown_thread.start()
config.set_shutdown() # Signal we're in shutdown now.