organize timers and threads to get proper shutdown

This commit is contained in:
Jakob Ketterl
2019-10-31 22:24:31 +01:00
parent af1a99c130
commit 95253e40bd
6 changed files with 49 additions and 29 deletions

View File

@ -62,7 +62,7 @@ class DmrMetaEnricher(object):
cache = DmrCache.getSharedInstance()
if not cache.isValid(id):
if not id in self.threads:
self.threads[id] = threading.Thread(target=self.downloadRadioIdData, args=[id])
self.threads[id] = threading.Thread(target=self.downloadRadioIdData, args=[id], daemon=True)
self.threads[id].start()
return None
data = cache.get(id)