Ensure we call close

pull/82770/head
Matt Martz 2 months ago
parent 67fe0b7e66
commit 52ae272e0e
No known key found for this signature in database
GPG Key ID: 40832D88E9FC91D8

@ -105,10 +105,10 @@ class WorkerProcess(multiprocessing_context.Process): # type: ignore[name-defin
with display._lock, cm:
super(WorkerProcess, self).start()
def terminate(self):
def close(self):
if self._master:
os.close(self._master)
super().terminate()
super().close()
def _hard_exit(self, e):
'''

@ -399,6 +399,8 @@ class StrategyBase:
worker_prc = self._workers[self._cur_worker]
if worker_prc is None or not worker_prc.is_alive():
if worker_prc:
worker_prc.close()
self._queued_task_cache[(host.name, task._uuid)] = {
'host': host,
'task': task,

Loading…
Cancel
Save