Remove ability to control the listening loop externally

It was probably scarcely used, and separate functionality will be
developed that makes this redundant anyhow.
This commit is contained in:
Mads Marquart
2019-09-08 15:39:39 +02:00
parent 650112a592
commit 856c1ffe0e
2 changed files with 6 additions and 37 deletions

View File

@@ -39,22 +39,20 @@ TEXT_LIST = [
class ClientThread(threading.Thread):
# TODO: Refactor this to work with the new listening setup
def __init__(self, client, *args, **kwargs):
self.client = client
self.should_stop = threading.Event()
super(ClientThread, self).__init__(*args, **kwargs)
def start(self):
self.client.startListening()
self.client.doOneListen() # QPrimer, Facebook now knows we're about to start pulling
self.client._doOneListen() # QPrimer, Facebook now knows we're about to start pulling
super(ClientThread, self).start()
def run(self):
while not self.should_stop.is_set() and self.client.doOneListen():
while not self.should_stop.is_set() and self.client._doOneListen():
pass
self.client.stopListening()
class CaughtValue(threading.Event):
def set(self, res):