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 vstinner
Recipients bquinlan, glangford, mark.dickinson, vstinner
Date 2014-01-23.13:48:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390484883.11.0.423030776975.issue20297@psf.upfronthosting.co.za>
In-reply-to
Content
I attached Glenn's function as a patch.

Comments on as_completed_proposed.patch:

- _create_and_install_waiters() doesn't remove duplicates using set(), so you change the behaving of as_completed(). I don't think that it is correct. as_completed([f, f]) should yield f twice, but I didn't check the current behaviour. Future._waiters is a list and so accept duplicated waiters.

- you replaced the _AcquireFutures context manager on all futures with an individual lock. In my opinion, it should be changed in a different patch. I don't know which option is better, but if it is changed, it should be changed in the whole file.

@Glenn: You should take a look at the Python Developer's Guide to learn how to write a patch and how to contribute to Python ;-)
http://docs.python.org/devguide/
History
Date User Action Args
2014-01-23 13:48:03vstinnersetrecipients: + vstinner, bquinlan, mark.dickinson, glangford
2014-01-23 13:48:03vstinnersetmessageid: <1390484883.11.0.423030776975.issue20297@psf.upfronthosting.co.za>
2014-01-23 13:48:03vstinnerlinkissue20297 messages
2014-01-23 13:48:02vstinnercreate