diff options
author | Philip Meier <github.pmeier@posteo.de> | 2023-01-02 10:22:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 09:22:45 +0000 |
commit | 6037ec3b9b0a5392ad0a9667ba91cdbc9608e64e (patch) | |
tree | 0710004c2c96467143074ab3f7919810dd5578f9 /sphinx/util/parallel.py | |
parent | cc8f697a9ba15e9556e86a8375a75dc905381c1a (diff) | |
download | sphinx-git-6037ec3b9b0a5392ad0a9667ba91cdbc9608e64e.tar.gz |
Use ``finally`` to terminate parallel processes (#10952)
Diffstat (limited to 'sphinx/util/parallel.py')
-rw-r--r-- | sphinx/util/parallel.py | 3 |
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): |