[issue20319] concurrent.futures.wait() can block forever even if Futures have completed

Glenn Langford report at bugs.python.org
Thu Jan 30 23:26:00 CET 2014


Glenn Langford added the comment:

An idea for a different possible fix - rather than cleaning up waiters in wait() and as_completed(), could they be removed in Future.set_result() and Futures.set_exception() ? 

I'm not certain if any waiter should ever be notified twice; if not, perhaps set_result() and set_exception() could just include

self._waiters = []

after all waiters have been signalled.

----------

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


More information about the Python-bugs-list mailing list