summaryrefslogtreecommitdiff
path: root/sphinx/util/parallel.py
diff options
context:
space:
mode:
authorPhilip Meier <github.pmeier@posteo.de>2023-01-02 10:22:45 +0100
committerGitHub <noreply@github.com>2023-01-02 09:22:45 +0000
commit6037ec3b9b0a5392ad0a9667ba91cdbc9608e64e (patch)
tree0710004c2c96467143074ab3f7919810dd5578f9 /sphinx/util/parallel.py
parentcc8f697a9ba15e9556e86a8375a75dc905381c1a (diff)
downloadsphinx-git-6037ec3b9b0a5392ad0a9667ba91cdbc9608e64e.tar.gz
Use ``finally`` to terminate parallel processes (#10952)
Diffstat (limited to 'sphinx/util/parallel.py')
-rw-r--r--sphinx/util/parallel.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py
index fec275572..16bb5f200 100644
--- a/sphinx/util/parallel.py
+++ b/sphinx/util/parallel.py
@@ -98,10 +98,9 @@ class ParallelTasks:
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):