From 59cd7dfe2c166a2a74344d2982044c3ca0ffe027 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 2 Nov 2022 12:44:23 +0100 Subject: [PATCH] use finally to terminate parallel processes --- sphinx/util/parallel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py index 201e5b5e250..b87453b06ba 100644 --- a/sphinx/util/parallel.py +++ b/sphinx/util/parallel.py @@ -96,10 +96,9 @@ def join(self) -> None: while self._pworking: if not self._join_one(): time.sleep(0.02) - except Exception: + finally: # shutdown other child processes on failure self.terminate() - raise def terminate(self) -> None: for tid in list(self._precvs):