From ed0c00e6e15107c9979090262865b2b2ae7b7dc7 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Tue, 18 Jul 2023 13:33:47 -0700 Subject: [PATCH] chore: Fixes UIB threads --- autostart/UIB_instance.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autostart/UIB_instance.py b/autostart/UIB_instance.py index 7b43f91..6cf80b6 100644 --- a/autostart/UIB_instance.py +++ b/autostart/UIB_instance.py @@ -44,12 +44,16 @@ def __init__(self, port="none", baud=115200, test_mode=False): self.run = True self.gps_ready = threading.Event() - self.listener = threading.Thread(target=self.uib_listener, name='UIB Listener') + self.listener = threading.Thread(target=self.uib_listener, + name='UIB Listener', + daemon=True) self.listener.start() self.recentLoc = None self.__last_timestamp: Optional[datetime.datetime] = None - self.__monitor = threading.Thread(target=self.__monitor_fn, name='UIB Monitor') + self.__monitor = threading.Thread(target=self.__monitor_fn, + name='UIB Monitor', + daemon=True) self.__monitor.start() @property