[issue33553] possible documentation improvement proposal for multiprocessing
New submission from Derek Kim <bluewhale8202@gmail.com>:
from multiprocessing import Pool p = Pool(5) def f(x): ... return x*x ... p.map(f, [1,2,3])
This example in the document is confusing because this is already wrong code when run with fork method even if you run it as a script. With fork start method, f should be defined before p is created. Also, just advising that one shouldn't use interactive shell and should run multiprocessing code in if __name__ == '__main__' is not informative becuase those conditions are generally no problem with fork method. Can I try improving the documentation? ---------- assignee: docs@python components: Documentation messages: 316892 nosy: Derek Kim, docs@python priority: normal severity: normal status: open title: possible documentation improvement proposal for multiprocessing versions: Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33553> _______________________________________
Change by Derek Kim <bluewhale8202@gmail.com>: ---------- title: possible documentation improvement proposal for multiprocessing -> Documentation improvement proposal for multiprocessing _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33553> _______________________________________
Derek Kim <bluewhale8202@gmail.com> added the comment: https://docs.python.org/3.8/library/multiprocessing.html#multiprocessing-pro... here is the link to the document. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33553> _______________________________________
Change by Karthikeyan Singaravelan <tir.karthi@gmail.com>: ---------- nosy: +xtreak _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33553> _______________________________________
Change by Terry J. Reedy <tjreedy@udel.edu>: ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33553> _______________________________________
participants (3)
-
Derek Kim
-
Karthikeyan Singaravelan
-
Terry J. Reedy