Message208942
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 it attempts to remove the Future twice from the pending set.
for future in finished:
yield future
pending.remove(future) ## KeyError triggered on as_completed( [f,f] )
See attached test which demonstrates the breakage.
Also, the behaviour of as_completed([f,f]) and wait([f,f], return_when=ALL_COMPLETED) is currently different. wait will only yield f once. |
|
Date |
User |
Action |
Args |
2014-01-23 14:33:33 | glangford | set | recipients:
+ glangford, bquinlan, mark.dickinson, vstinner |
2014-01-23 14:33:33 | glangford | set | messageid: <1390487613.45.0.0243300012157.issue20297@psf.upfronthosting.co.za> |
2014-01-23 14:33:33 | glangford | link | issue20297 messages |
2014-01-23 14:33:33 | glangford | create | |
|