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 <rep...@bugs.python.org>
<http://bugs.python.org/issue19185>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to