[issue45914] Very first multiprocessing example not working on Windows 11

2021-12-03 Thread Eryk Sun
Eryk Sun added the comment: > not quite clear to me it this only applies on Windows or is general. macOS defaults to the spawn method (bpo-33725). -- ___ Python tracker ___ _

[issue45914] Very first multiprocessing example not working on Windows 11

2021-12-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think something should be said right after the example. But the 20 line note seems a bit too much at this location. Perhaps insert (For reasons given _below_, this will raise error if enter interactively.) with _below_, say, linked to the 20 line note.

[issue45914] Very first multiprocessing example not working on Windows 11

2021-11-27 Thread Alex Waygood
Change by Alex Waygood : -- type: crash -> behavior versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list m

[issue45914] Very first multiprocessing example not working on Windows 11

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > AttributeError: Can't get attribute 'f' > on The Windows API only supports the spawn method of process creation. In POSIX (except macOS), the default is the fork method, for which the child inherits the interactive main module of the parent. If you switch to t

[issue45914] Very first multiprocessing example not working on Windows 11

2021-11-27 Thread Chang Zhou
New submission from Chang Zhou : Very first multiprocessing example not working on Windows 11 https://docs.python.org/3/library/multiprocessing.html from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': with Pool(5) as p: print(p.map(f, [1, 2, 3]))