Skip to content

Commit

Permalink
Add stopPool functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewThe committed Dec 15, 2023
1 parent 93fdfd3 commit 8c15ad8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions job_pool/job_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def checkPool(self, printProgressEvery: int = -1):
self.pool.join()
sys.exit(1)

def stopPool(self):
self.pool.terminate()
self.pool.join()

def checkForTerminatedProcess(self, res, processes):
start_time = time.time()
while not res.ready():
Expand Down

0 comments on commit 8c15ad8

Please sign in to comment.