bpo-39244: multiprocessing get all start methods#18529
Conversation
Co-Authored-By: Victor Stinner <vstinner@python.org>
…s://github.com/idomic/cpython into bpo-39244multiprocessing-get_all_start_methods
|
|
||
| def get_all_start_methods(self): | ||
| if sys.platform == 'win32': | ||
| if sys.platform == 'win32' or sys.platform == 'darwin': |
There was a problem hiding this comment.
Presumably, non-spawn start methods still exist.
There was a problem hiding this comment.
You're right! I've added a new switch case to deal only with macos
|
Not sure this is the correct fix, fork and forkserver still exist on macOS. I would think get_all_start_methods should return ['spawn', 'fork', 'forkserver'] on macOS. |
| if sys.platform == 'win32': | ||
| return ['spawn'] | ||
| elif sys.platform == 'darwin': | ||
| return ['spawn', 'fork', 'forkserver'] |
There was a problem hiding this comment.
Is HAVE_SEND_HANDLE guaranteed to be defined on macOS?
There was a problem hiding this comment.
I think it's always set from a certain version (could not find documentation for that), the example of the code that defaults to this case and to 'fork' is in the bugs.python.
|
Adding @taleinat |
Codecov Report
@@ Coverage Diff @@
## master #18529 +/- ##
===========================================
+ Coverage 82.20% 83.13% +0.93%
===========================================
Files 1958 1571 -387
Lines 589743 414833 -174910
Branches 44457 44460 +3
===========================================
- Hits 484772 344858 -139914
+ Misses 95308 60347 -34961
+ Partials 9663 9628 -35
Continue to review full report at Codecov.
|
|
This is an old PR, please refer to the clean one: GH-18625 |
bpo-39244: multiprocessing get all start methods
[3.8] bpo-39244: multiprocessing get all start methods (GH-18529)
[3.9] bpo-39244: multiprocessing get all start methods (GH-18529)
https://bugs.python.org/issue39244