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 glangford
Date 2014-01-21.00:18:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
concurrent.futures.wait() can get into a state where it blocks forever on waiter.event.wait(), even when the underlying Futures have completed.

This is demonstrated in a stress test where a large number of wait() calls are run in multiple threads, contending for the same Futures.

The cause is believed to be waiter removal, which is done without locking the Future. 

A suggested fix which appears to work is to change the following code in wait():

for f in fs:


for f in fs:
    with f._condition:
Date User Action Args
2014-01-21 00:18:39glangfordsetrecipients: + glangford
2014-01-21 00:18:39glangfordsetmessageid: <>
2014-01-21 00:18:39glangfordlinkissue20319 messages
2014-01-21 00:18:39glangfordcreate