[issue19185] Allow multiprocessing Pool initializer to return values

Matteo Cafasso report at bugs.python.org
Sun Oct 6 22:14:30 CEST 2013


New submission from Matteo Cafasso:

This patch allows the pool initializer function to return the initialized values. The returned values will be passed to the called function as first positional argument.

Previously the common pattern was to store the initialized objects into global variables making the code more difficult to manage.

The patch is not breaking any backward compatibility as the previous initializers were not supposed to return any value, if the initializer does not return anything the behavior is the same as usual.

----------
files: pool_initializer.patch
keywords: patch
messages: 199116
nosy: noxdafox
priority: normal
severity: normal
status: open
title: Allow multiprocessing Pool initializer to return values
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31978/pool_initializer.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19185>
_______________________________________


More information about the Python-bugs-list mailing list