From dc8c4c751b7b35022c50fd21303489b288a6eadb Mon Sep 17 00:00:00 2001 From: Hauke Platte Date: Tue, 12 Mar 2024 16:11:45 +0100 Subject: [PATCH] fix(AI): Start AI thread as deamon to close on application close [TTTK-21, TTTK-54] --- AI/ai_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/ai_context.py b/AI/ai_context.py index e24153a..0f80366 100644 --- a/AI/ai_context.py +++ b/AI/ai_context.py @@ -18,7 +18,7 @@ def set_strategy(self, strategy: ai_strategy.AIStrategy): # Runs the strategy as a new thread and returns the thread def run_strategy(self): - thread = Thread(target=self._strategy.thread_entry) + thread = Thread(target=self._strategy.thread_entry, daemon=True) thread.start() return thread