[issue29108] Python 3.6.0 multiprocessing map_async callback
Jose Miguel Colella added the comment: Hello David, Thanks for your response. Improvements to the documentation could clear this misunderstanding. I had initially believed that after transforming with the function passed to the map, it would use the callback on each of the result arguments. Just to understand the use case of the callback. So basically it should not return anything and be a simple print? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29108] Python 3.6.0 multiprocessing map_async callback
Jose Miguel Colella added the comment: The result is: Here: [1, 4, 9] [1, 4, 9] -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29108] Python 3.6.0 multiprocessing map_async callback
New submission from Jose Miguel Colella: Hello I am trying to use the callback for the map_async method for Pool, but have found a bug. In the below code, only the print statement is carried out, the return is completely ignored. Is this working as designed or is this a bug? from multiprocessing import Pool def f(x): return x * x def s(x): print(f'Here: {x}') return type(x) if __name__ == '__main__': with Pool(5) as p: result = p.map_async(f, [1, 2, 3], callback=s) q = result.get() print(q) -- components: Library (Lib) files: main2.py messages: 284295 nosy: Jose Miguel Colella priority: normal severity: normal status: open title: Python 3.6.0 multiprocessing map_async callback type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file46084/main2.py ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29108> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com