don't start up unnecesserily
This commit is contained in:
parent
671509df3b
commit
6ec85aa349
@ -635,7 +635,6 @@ class CpuUsageThread(threading.Thread):
|
|||||||
def getSharedInstance():
|
def getSharedInstance():
|
||||||
if CpuUsageThread.sharedInstance is None:
|
if CpuUsageThread.sharedInstance is None:
|
||||||
CpuUsageThread.sharedInstance = CpuUsageThread()
|
CpuUsageThread.sharedInstance = CpuUsageThread()
|
||||||
CpuUsageThread.sharedInstance.start()
|
|
||||||
return CpuUsageThread.sharedInstance
|
return CpuUsageThread.sharedInstance
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -679,6 +678,8 @@ class CpuUsageThread(threading.Thread):
|
|||||||
|
|
||||||
def add_client(self, c):
|
def add_client(self, c):
|
||||||
self.clients.append(c)
|
self.clients.append(c)
|
||||||
|
if not self.is_alive():
|
||||||
|
self.start()
|
||||||
|
|
||||||
def remove_client(self, c):
|
def remove_client(self, c):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user