[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

STINNER Victor report at bugs.python.org
Tue Sep 30 12:13:30 CEST 2014


STINNER Victor added the comment:

Sorry, I'm coming later after the review and the commit, but I worry about performances of _run_once() since it's the core of asyncio. Yury proposed to only iterate once on self._scheduled when removing delayed calls, and I have the same concern.

Here is a patch which change _run_once() to only iterate once.

IMO the change is obvious, the current iterates twice and makes the same check twice (check the _cancelled attribute of handles).

----------
keywords: +patch
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file36758/asyncio_remove_delayed.patch

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


More information about the Python-bugs-list mailing list