[Python-ideas] 2 ideas for `concurrent.futures`

Ram Rachum ram.rachum at gmail.com
Fri May 10 23:16:27 CEST 2013


I have 2 ideas I thought about for the `futures` module:

1. A method `Executor.filter` that will be to the built-in `filter` what 
`Executor.filter` is to the built-in `map`.

2. A keyword argument `join_on_exit` to `Executor.__init__`, with a default 
of `False`. When `True`, upon `Executor.__exit__` all futures will be run 
to completion. This'll be useful to avoid the `Cannot schedule new futures 
after shutdown` exception without manually exhausting all the iterators 
returned by e.g. `Executor.map`.

What do you think?


Thanks,
Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130510/8bcdd6ab/attachment.html>


More information about the Python-ideas mailing list