[Python-ideas] Add `Executor.filter`

Nick Coghlan ncoghlan at gmail.com
Thu May 7 05:56:21 CEST 2015


On 2 May 2015 at 19:25, Ram Rachum <ram at rachum.com> wrote:
> Okay, I implemented it. Might be getting something wrong because I've never
> worked with the internals of this module before.

I think this is sufficiently tricky to get right that it's worth
adding filter() as a parallel to the existing map() API.

However, it did raise a separate question for me: is it currently
possible to use Executor.map() and the as_completed() module level
function together? Unless I'm missing something, it doesn't look like
it, as map() hides the futures from the caller, so you only have
something to pass to as_completed() if you invoke submit() directly.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list