[issue20566] asyncio as_completed() thrashes adding and removing callbacks

Guido van Rossum report at bugs.python.org
Sat Feb 8 22:16:59 CET 2014


Guido van Rossum added the comment:

Yup, I remember feeling a bit guilty doing it this way, but at least the semantics are correctly, and there were bigger fish to fry. Thanks for the test code that proves the issue!

I assume it can be fixed by not using _wait() but some custom approach. If we get this done by RC2, fine, otherwise we'll just have to documented that this is O(N**2) and not to use it for large numbers of tasks until the fix lands, perhaps in 3.4.1. (Usually there's a solution that avoids as_completed() altogether.)

I've created upstream bug http://code.google.com/p/tulip/issues/detail?id=127 to track this.

----------

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


More information about the Python-bugs-list mailing list