diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-05-24 04:16:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-24 04:16:02 (GMT) |
commit | 00fd5440f03e55718bad76dbc45725f24744596c (patch) | |
tree | f27b88c976dc6113c37bd9b7ebdd41b0428c60c7 /Lib/multiprocessing/context.py | |
parent | de9444ef94abe0cc8f72c26cd3900f4c66883646 (diff) | |
download | cpython-00fd5440f03e55718bad76dbc45725f24744596c.zip cpython-00fd5440f03e55718bad76dbc45725f24744596c.tar.gz cpython-00fd5440f03e55718bad76dbc45725f24744596c.tar.bz2 |
[3.14] gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462) (#134619)
gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462)
Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.
---------
(cherry picked from commit 80284b5c5eebd0e603c38322f94a97a2853ceeba)
Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Lib/multiprocessing/context.py')
-rw-r--r-- | Lib/multiprocessing/context.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/multiprocessing/context.py b/Lib/multiprocessing/context.py index d0a3ad0..051d567 100644 --- a/Lib/multiprocessing/context.py +++ b/Lib/multiprocessing/context.py @@ -145,7 +145,7 @@ class BaseContext(object): '''Check whether this is a fake forked process in a frozen executable. If so then run code specified by commandline and exit. ''' - if sys.platform == 'win32' and getattr(sys, 'frozen', False): + if self.get_start_method() == 'spawn' and getattr(sys, 'frozen', False): from .spawn import freeze_support freeze_support() |