[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-07-18 Thread Glenn Langford
Changes by Glenn Langford : -- nosy: -glangford ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread Glenn Langford
Glenn Langford added the comment: > - 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.

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread Glenn Langford
Changes by Glenn Langford : Added file: http://bugs.python.org/file33657/test_dupfuture.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread Glenn Langford
Changes by Glenn Langford : Removed file: http://bugs.python.org/file33656/test_dupfuture.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread STINNER Victor
STINNER Victor added the comment: > I think you have identified another bug in the current code. Please open a separated issue in this case. -- ___ Python tracker ___ __

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread Glenn Langford
Glenn Langford added the comment: 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

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread STINNER Victor
STINNER Victor added the comment: 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

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-23 Thread Glenn Langford
Changes by Glenn Langford : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-21 Thread Glenn Langford
Changes by Glenn Langford : -- nosy: +bquinlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-21 Thread Glenn Langford
Glenn Langford added the comment: Uploading proposed new version of as_completed() for review. Note the following changes: - does not install waiters for Futures which are completed - locks only one Future at a time to improve concurrency (rather than locking all Futures at once); traverses Fu

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-20 Thread Glenn Langford
Glenn Langford added the comment: See also http://bugs.python.org/issue20319 -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-18 Thread Glenn Langford
New submission from Glenn Langford: as_completed() calls _create_and_install_waiters() over all given Futures, even if some (or all) of the Futures have already completed. The following fragment of the as_completed code (from 3.3.3): with _AcquireFutures(fs): finished = set(