[issue24475] The docs never define what a pool "task" is

New submission from Zahari Dim:
See:
http://stackoverflow.com/questions/30943161/multiprocessing-pool-with-maxtas...
The documentation never makes clear what a "task" in the context of Pool.map. At best, it says:
"This method chops the iterable into a number of chunks which it submits to the process pool as separate tasks. The (approximate) size of these chunks can be specified by setting chunksize to a positive integer."
in the map documentation. However it does not say how this chunks are calculated by default, making the maxtasksperchild argument not very useful. The fact that a function evaluated by map is not a "task" should be much clearer in the documentation.
Also, in the examples, such as:
with multiprocessing.Pool(PROCESSES) as pool: # # Tests #
TASKS = [(mul, (i, 7)) for i in range(10)] + \ [(plus, (i, 8)) for i in range(10)]
results = [pool.apply_async(calculate, t) for t in TASKS] imap_it = pool.imap(calculatestar, TASKS) imap_unordered_it = pool.imap_unordered(calculatestar, TASKS)
TASKS are not actually "tasks" but rather "task groups".
---------- assignee: docs@python components: Documentation messages: 245509 nosy: Zahari.Dim, docs@python priority: normal severity: normal status: open title: The docs never define what a pool "task" is versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue24475 _______________________________________

Changes by Ned Deily nad@acm.org:
---------- nosy: +davin, sbt versions: -Python 3.2, Python 3.3
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue24475 _______________________________________

Daniel Neuberger added the comment:
I second this. I was definitely confused at first and it took me a little while of googling to realize that jobs are not what one (at least me) would intuitively think they are.
---------- nosy: +Daniel Neuberger
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue24475 _______________________________________

Changes by Davin Potts python@discontinuity.net:
---------- type: -> enhancement
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue24475 _______________________________________

Change by Irit Katriel iritkatriel@yahoo.com:
---------- components: +Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue24475 _______________________________________
participants (5)
-
Daniel Neuberger
-
Davin Potts
-
Irit Katriel
-
Ned Deily
-
Zahari Dim