[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

Andreas van Cranenburgh report at bugs.python.org
Thu May 8 01:15:38 CEST 2014


Andreas van Cranenburgh added the comment:

Here's a patch. I have added initializer and initargs keywords to both ThreadPoolExecutor and ProcessPoolExecutor, with the same semantics as multiprocessing.Pool.

I couldn't figure out what to do if the initializer fails with a ProcessPoolExecutor: how to properly send the traceback back? I also haven't gotten around to figure out how to write tests.
I haven't added unitializers, don't know if they would be useful.

----------
keywords: +patch
Added file: http://bugs.python.org/file35179/pool_initializer.patch

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


More information about the Python-bugs-list mailing list