mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use `finally
` to terminate parallel processes (#10952)
This commit is contained in:
parent
cc8f697a9b
commit
6037ec3b9b
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user