From 6ec85aa349bbd5a3247f3c080367e19e6a50ff52 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 21 Sep 2019 15:24:06 +0200 Subject: [PATCH] don't start up unnecesserily --- owrx/source.py | 3 ++- owrx/threading.py | 0 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 owrx/threading.py diff --git a/owrx/source.py b/owrx/source.py index eff9e29..2c475ec 100644 --- a/owrx/source.py +++ b/owrx/source.py @@ -635,7 +635,6 @@ class CpuUsageThread(threading.Thread): def getSharedInstance(): if CpuUsageThread.sharedInstance is None: CpuUsageThread.sharedInstance = CpuUsageThread() - CpuUsageThread.sharedInstance.start() return CpuUsageThread.sharedInstance def __init__(self): @@ -679,6 +678,8 @@ class CpuUsageThread(threading.Thread): def add_client(self, c): self.clients.append(c) + if not self.is_alive(): + self.start() def remove_client(self, c): try: diff --git a/owrx/threading.py b/owrx/threading.py deleted file mode 100644 index e69de29..0000000