Skip to content

Commit e61027d

Browse files
committed
close zmq pipes
1 parent 84da83e commit e61027d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

parsl/executors/high_throughput/executor.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,21 @@ def shutdown(self, timeout: float = 10.0):
822822
logger.info("Unable to terminate Interchange process; sending SIGKILL")
823823
self.interchange_proc.kill()
824824

825+
logger.info("closing context sockets")
826+
# this might block if there are outstanding messages (eg if the interchange
827+
# has gone away... probably something to do with zmq.LINGER sockopt to remove
828+
# this hang risk?
829+
830+
# these should be initialized to none rather than being absent?
831+
if hasattr(self, "incoming_q"):
832+
self.incoming_q.close()
833+
834+
if hasattr(self, "outgoing_q"):
835+
self.outgoing_q.close()
836+
837+
if hasattr(self, "command_client"):
838+
self.command_client.close()
839+
825840
logger.info("Finished HighThroughputExecutor shutdown attempt")
826841

827842
def get_usage_information(self):

0 commit comments

Comments
 (0)