Skip to content

Commit

Permalink
Use finally to terminate parallel processes (#10952)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Jan 2, 2023
1 parent cc8f697 commit 6037ec3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sphinx/util/parallel.py
Expand Up @@ -98,10 +98,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):
Expand Down

0 comments on commit 6037ec3

Please sign in to comment.