Skip to content

Commit

Permalink
Merge pull request #2 from pyiron/main
Browse files Browse the repository at this point in the history
merge main
  • Loading branch information
jan-janssen authored Nov 7, 2023
2 parents f708ee2 + 0a4b1a6 commit fdc3887
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pympipool/shared/executorbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,17 @@ def shutdown(self, wait=True, *, cancel_futures=False):
self._future_queue.put({"shutdown": True, "wait": wait})
self._process.join()
self._future_queue.join()
self._process = None

def __len__(self):
return self._future_queue.qsize()

def __del__(self):
try:
self.shutdown(wait=True)
except (AttributeError, RuntimeError):
pass

def _set_init_function(self, init_function):
if init_function is not None:
self._future_queue.put(
Expand Down

0 comments on commit fdc3887

Please sign in to comment.