diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-01-27 21:15:28 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-01-27 21:15:28 +0100 |
commit | e77f8a99cea2b600ac3b3b575e7633c1c3ccf72c (patch) | |
tree | 45cfe9037da144c9e5c783c85111a98bab50c9c5 | |
parent | distutils: make -OO enable both opt-1 and opt-2 optimization (diff) | |
download | pypy-gentoo-3.9-7.3.8rc1_p1.tar.gz pypy-gentoo-3.9-7.3.8rc1_p1.tar.bz2 pypy-gentoo-3.9-7.3.8rc1_p1.zip |
multiprocessing.context: Default to spawn contextgentoo-3.9-7.3.8rc1_p1
Default to spawn context since the fork context seems to be causing
deadlocks on PyPy3.9.
-rw-r--r-- | lib-python/3/multiprocessing/context.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib-python/3/multiprocessing/context.py b/lib-python/3/multiprocessing/context.py index 8d0525d5d6..5fd3991b1c 100644 --- a/lib-python/3/multiprocessing/context.py +++ b/lib-python/3/multiprocessing/context.py @@ -310,12 +310,9 @@ if sys.platform != 'win32': 'spawn': SpawnContext(), 'forkserver': ForkServerContext(), } - if sys.platform == 'darwin': - # bpo-33725: running arbitrary code after fork() is no longer reliable - # on macOS since macOS 10.14 (Mojave). Use spawn by default instead. - _default_context = DefaultContext(_concrete_contexts['spawn']) - else: - _default_context = DefaultContext(_concrete_contexts['fork']) + # fork context seems to cause frequent hangs in pypy3.9 + # https://foss.heptapod.net/pypy/pypy/-/issues/3650 + _default_context = DefaultContext(_concrete_contexts['spawn']) else: |