[issue22729] concurrent.futures `wait` and `as_completed` depend on private api

Ben Mather report at bugs.python.org
Tue Oct 3 05:41:03 EDT 2017


Ben Mather <bwhmather at bwhmather.com> added the comment:

@Nathaniel
RE `remove_done_callback`:  This was added as an optimisation to allow the `as_completed` iterator to remove callbacks for future that it has visited instead of having to store a separate set of visited futures and ignore them when their callbacks are triggered.

This matches how the private waiters mechanism works.

It might be worth submitting the core of this change without `remove_done_callback` and then discussing it later as a separate optimisation.  I will experiment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22729>
_______________________________________


More information about the Python-bugs-list mailing list