diff options
author | idomic <michael.ido@gmail.com> | 2020-05-26 14:54:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 14:54:21 (GMT) |
commit | db098bc1f05bd0773943e59f83489f05f28dedf8 (patch) | |
tree | 05d3c4c2d7910fed80411f653a4afe842a430bc8 /Lib/multiprocessing | |
parent | 5eb45d7d4e812e89d77da84cc619e9db81561a34 (diff) | |
download | cpython-db098bc1f05bd0773943e59f83489f05f28dedf8.zip cpython-db098bc1f05bd0773943e59f83489f05f28dedf8.tar.gz cpython-db098bc1f05bd0773943e59f83489f05f28dedf8.tar.bz2 |
bpo-39244: multiprocessing return default start method first on macOS (GH-18625)
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/context.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/multiprocessing/context.py b/Lib/multiprocessing/context.py index 5f8e0f0..8d0525d 100644 --- a/Lib/multiprocessing/context.py +++ b/Lib/multiprocessing/context.py @@ -257,10 +257,11 @@ class DefaultContext(BaseContext): if sys.platform == 'win32': return ['spawn'] else: + methods = ['spawn', 'fork'] if sys.platform == 'darwin' else ['fork', 'spawn'] if reduction.HAVE_SEND_HANDLE: - return ['fork', 'spawn', 'forkserver'] - else: - return ['fork', 'spawn'] + methods.append('forkserver') + return methods + # # Context types for fixed start method |