Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 91d7f24

Browse files
committed
Drop -j4 and switch to ProcessPoolExecutor.
Dropping -j4 due to: https://mail.python.org/archives/list/[email protected]/thread/POWT35ULU2CPELWQ6BRTLTU5H3YKHQZW/ Switching to ProcessPoolExecutor because I'm seeing a few defunct sphinx-build when using a thread pool (forking under threads may not be a good idea).
1 parent 0860320 commit 91d7f24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build_docs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import shutil
3939
import subprocess
4040
import sys
41-
from concurrent.futures import ALL_COMPLETED, ThreadPoolExecutor, wait
41+
from concurrent.futures import ALL_COMPLETED, ProcessPoolExecutor, wait
4242
from datetime import datetime
4343

4444

@@ -226,7 +226,7 @@ def build_one(
226226
)
227227
logging.info("Build start for version: %s, language: %s", str(version), language)
228228
sphinxopts = SPHINXOPTS[language].copy()
229-
sphinxopts.extend(["-j4", "-q"])
229+
sphinxopts.extend(["-q"])
230230
if language != "en":
231231
gettext_language_tag = pep_545_tag_to_gettext_tag(language)
232232
locale_dirs = os.path.join(build_root, str(version), "locale")
@@ -513,7 +513,7 @@ def main():
513513
# instead of none. "--languages en" builds *no* translation,
514514
# as "en" is the untranslated one.
515515
args.languages = LANGUAGES
516-
with ThreadPoolExecutor(max_workers=args.jobs) as executor:
516+
with ProcessPoolExecutor(max_workers=args.jobs) as executor:
517517
futures = []
518518
for version, git_branch, devel in branches_to_do:
519519
for language in args.languages:

0 commit comments

Comments
 (0)