Daemonize all threads to avoid breaking IOLoop exception handling (i.e tornado)

This commit is contained in:
Kristóf Tóth 2019-05-07 17:16:43 +02:00
parent 9f23ff1d6b
commit b1d23f9d95
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ from .terminate_process_on_failure import terminate_process_on_failure
class PipeIOServer(ABC, Thread):
def __init__(self, in_pipe=None, out_pipe=None, permissions=0o600):
super().__init__()
super().__init__(daemon=True)
self._in_pipe, self._out_pipe = in_pipe, out_pipe
self._create_pipes(permissions)
self._stop_event = Event()

View File

@ -11,7 +11,7 @@ class PipeReaderThread(Thread):
stop_sequence = b'stop_reading\n'
def __init__(self, pipe_path, stop_event, message_handler):
super().__init__()
super().__init__(daemon=True)
self._message_handler = message_handler
self._pipe_path = pipe_path
self._stop_event = stop_event

View File

@ -9,7 +9,7 @@ from .deque import Deque
class PipeWriterThread(Thread):
def __init__(self, pipe_path, stop_event):
super().__init__()
super().__init__(daemon=True)
self._pipe_path = pipe_path
self._stop_event = stop_event
self._write_queue = Deque()