We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd8b028 commit ebd6b99Copy full SHA for ebd6b99
utils/update_checkout/update_checkout/parallel_runner.py
@@ -48,7 +48,13 @@ def __init__(
48
):
49
self._monitor_polling_period = 0.1
50
if n_processes == 0:
51
- n_processes = cpu_count() * 2
+ if sys.version_info.minor < 10:
52
+ # On Python < 3.10, https://bugs.python.org/issue46391 causes
53
+ # Pool.map and its variants to hang. Limiting the number of
54
+ # processes fixes the issue.
55
+ n_processes = int(cpu_count() * 1.25)
56
+ else:
57
+ n_processes = cpu_count() * 2
58
self._terminal_width = shutil.get_terminal_size().columns
59
self._n_processes = n_processes
60
self._pool_args = pool_args
0 commit comments