Skip to content

Commit 114e701

Browse files
authored
Close processes in Work Queue and Task Vine shutdown (#3576)
This releases 2 file descriptors with work queue (from 21 to 19 at the end of CI Work Queue test) and 4 file descriptors with Task Vine (from 19 to 15 at the end of CI Task Vine test) This is part of work being merged from draft PR #3397 to shut down components more cleanly, rather than relying on process exit.
1 parent 1c7a0e4 commit 114e701

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

parsl/executors/taskvine/executor.py

+2
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,13 @@ def shutdown(self, *args, **kwargs):
589589
# Join all processes before exiting
590590
logger.debug("Joining on submit process")
591591
self._submit_process.join()
592+
self._submit_process.close()
592593
logger.debug("Joining on collector thread")
593594
self._collector_thread.join()
594595
if self.worker_launch_method == 'factory':
595596
logger.debug("Joining on factory process")
596597
self._factory_process.join()
598+
self._factory_process.close()
597599

598600
# Shutdown multiprocessing queues
599601
self._ready_task_queue.close()

parsl/executors/workqueue/executor.py

+2
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ def shutdown(self, *args, **kwargs):
704704

705705
logger.debug("Joining on submit process")
706706
self.submit_process.join()
707+
self.submit_process.close()
708+
707709
logger.debug("Joining on collector thread")
708710
self.collector_thread.join()
709711

0 commit comments

Comments
 (0)