diff options
Diffstat (limited to 'sphinx/util/parallel.py')
-rw-r--r-- | sphinx/util/parallel.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py index 0afdff9..10f8c89 100644 --- a/sphinx/util/parallel.py +++ b/sphinx/util/parallel.py @@ -94,7 +94,12 @@ class ParallelTasks: proc = context.Process(target=self._process, args=(psend, task_func, arg)) self._procs[tid] = proc self._precvsWaiting[tid] = precv - self._join_one() + try: + self._join_one() + except Exception: + # shutdown other child processes on failure + # (e.g. OSError: Failed to allocate memory) + self.terminate() def join(self) -> None: try: |