[New-bugs-announce] [issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

Glenn Langford report at bugs.python.org
Thu Jan 23 16:33:51 CET 2014


New submission from Glenn Langford:

For a Future f which has already completed, 
  wait( [f,f], return_when=ALL_COMPLETED ) 
blocks forever.

This is because the test in wait():

  if len(done) == len(fs)

is comparing the length of a set to the length of a list. 

If f has not completed, wait( [f,f] ) will yield f once. The behaviour should be consistent with as_completed() - see issue #20367.

----------
files: test_dupfuture_wait.py
messages: 208960
nosy: glangford, haypo, mark.dickinson, tim.peters
priority: normal
severity: normal
status: open
title: concurrent.futures.wait() blocks forever when given duplicate Futures
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33660/test_dupfuture_wait.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20369>
_______________________________________


More information about the New-bugs-announce mailing list