Skip to content

Commit

Permalink
Merge pull request #285 from pyiron/type_hint_RaisingThread
Browse files Browse the repository at this point in the history
Fix type hint for threads
  • Loading branch information
jan-janssen authored Apr 2, 2024
2 parents 47ab920 + 9b6431d commit 79b83a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pympipool/shared/executorbase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import threading
from typing import Optional
from concurrent.futures import (
Executor as FutureExecutor,
Expand All @@ -12,6 +11,7 @@
import cloudpickle

from pympipool.shared.communication import interface_bootup
from pympipool.shared.thread import RaisingThread


class ExecutorBase(FutureExecutor):
Expand Down Expand Up @@ -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()

Expand All @@ -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()

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 79b83a0

Please sign in to comment.