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 josh.r
Recipients jiangwanwei, josh.r
Date 2017-03-06.15:48:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The docs ( ) do seem to indicate it shouldn't do so as long as results were available before the timeout expired:

"The returned iterator raises a concurrent.futures.TimeoutError if __next__() is called and the result isn’t available after timeout seconds from the original call to as_completed()."

My reading of that would be that it raises the error only when:

1. The timeout has expired
2. The call would block (or possibly, would have blocked after the timeout expired), indicating no result was available

Handling "would have blocked" is hard, but might it make sense to still allow a non-blocking wait on the event even if the timeout has expired, with the exception raised only if the non-blocking wait fails?

Side-note: Looks like this code is still using time.time, not time.monotonic, so it's vulnerable to system clock adjustments; NTP updates could cause a five second timeout to expire instantly, or take seconds or even minutes longer to expire.
Date User Action Args
2017-03-06 15:48:19josh.rsetrecipients: + josh.r, jiangwanwei
2017-03-06 15:48:19josh.rsetmessageid: <>
2017-03-06 15:48:19josh.rlinkissue29733 messages
2017-03-06 15:48:18josh.rcreate