[issue21163] asyncio doesn't warn if a task is destroyed during its execution

Yury Selivanov report at bugs.python.org
Tue Jun 24 02:37:39 CEST 2014


Yury Selivanov added the comment:

>@Guido, @Yury: What do you think of log_destroyed_pending_task.patch? Does it sound correct?

Premature task garbage collection is indeed hard to debug. But at least, with your patch, one gets an exception and has a chance to track the bug down. So I'm +1 for the patch.

As for having strong references to tasks: it may have its own downsides, such as hard to debug memory leaks. I'd rather prefer my program to crash and/or having your patch report me the problem, than to search for an obscure code that eats all server memory once a week. I think we need to collect more evidence that the problem is common & annoying, before making any decisions on this topic, as that's something that will be hard to revert. Hence I'm -1 for strong references.

----------

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


More information about the Python-bugs-list mailing list