STINNER Victor added the comment:

I don't understand how keeping a strong refrence would fix anything. You
only provided one example (async-gc-bug.py) which uses Queue objects but
keep weak references to them. Keeping strong references to tasks is not the
right fix. You must keep strong references to queues. If a queue is
destroyed, how can you put an item into it? Otherwise, the task will wait
forever. Keeping a strong refrence to the task just hides the bug. Or I
missed something.

I dislike the idea of keeping strong references to tasks, it may create
even more reference cycles. We already have too many cycles with exceptions
stored in futures (in tasks).

The current unit test uses low level functions to remove a variable using a
frame object. Can you provide an example which shows the bug without using
low level functions?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21163>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to