Fix bug where I'd accidentally override threading.Thread internals

This commit is contained in:
Kristóf Tóth 2019-05-09 15:26:39 +02:00
parent 38c81e0d29
commit 5b79dbff2b
1 changed files with 2 additions and 2 deletions

View File

@ -47,14 +47,14 @@ class PipeIOServer(ABC, Thread):
for thread in self._io_threads:
thread.start()
self._stop_event.wait()
self._stop()
self._stop_threads()
def stop(self):
self._stop_event.set()
if self.is_alive():
self.join()
def _stop(self):
def _stop_threads(self):
for thread in self._io_threads:
if thread.is_alive():
thread.stop()