diff --git a/pympipool/shared/executorbase.py b/pympipool/shared/executorbase.py index 1075bddd..d5273385 100644 --- a/pympipool/shared/executorbase.py +++ b/pympipool/shared/executorbase.py @@ -1,4 +1,3 @@ -import threading from typing import Optional from concurrent.futures import ( Executor as FutureExecutor, @@ -12,6 +11,7 @@ import cloudpickle from pympipool.shared.communication import interface_bootup +from pympipool.shared.thread import RaisingThread class ExecutorBase(FutureExecutor): @@ -76,7 +76,7 @@ def shutdown(self, wait: bool = True, *, cancel_futures: bool = False): self._process = None self._future_queue = None - def _set_process(self, process: threading.Thread): + def _set_process(self, process: RaisingThread): self._process = process self._process.start() @@ -89,7 +89,7 @@ def __del__(self): except (AttributeError, RuntimeError): pass - def _set_process(self, process: threading.Thread): + def _set_process(self, process: RaisingThread): self._process = process self._process.start() @@ -121,7 +121,7 @@ def shutdown(self, wait: bool = True, *, cancel_futures: bool = False): self._process = None self._future_queue = None - def _set_process(self, process: threading.Thread): + def _set_process(self, process: RaisingThread): self._process = process for process in self._process: process.start()