bpo-39244: multiprocessing return default start method first on macOS (GH-18625)

(cherry picked from commit db098bc1f0)

Co-authored-by: idomic <michael.ido@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-05-26 08:13:33 -07:00 committed by GitHub
parent 500cd89ecc
commit 1c88bf8541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -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