This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author glangford
Recipients bquinlan, glangford, mark.dickinson, vstinner
Date 2014-01-23.14:33:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390487613.45.0.0243300012157.issue20297@psf.upfronthosting.co.za>
In-reply-to
Content
Comments on @Victor's comments - I will have a look at the dev guide.  :-)

I think you have identified another bug in the current code. 

"Future._waiters is a list and so accept duplicated waiters." What this means is that the following code is broken, because it attempts to remove the Future twice from the pending set.

for future in finished:
     yield future
     pending.remove(future)  ## KeyError triggered on as_completed( [f,f] )

See attached test which demonstrates the breakage.

Also, the behaviour of as_completed([f,f]) and wait([f,f], return_when=ALL_COMPLETED) is currently different. wait will only yield f once.
History
Date User Action Args
2014-01-23 14:33:33glangfordsetrecipients: + glangford, bquinlan, mark.dickinson, vstinner
2014-01-23 14:33:33glangfordsetmessageid: <1390487613.45.0.0243300012157.issue20297@psf.upfronthosting.co.za>
2014-01-23 14:33:33glangfordlinkissue20297 messages
2014-01-23 14:33:33glangfordcreate