Marko Rauhamaa <ma...@pacujo.net>: > Ian Kelly <ian.g.ke...@gmail.com>: > >> Actually I think this explains it. In the OP's while loop, he updates >> his task list with the line: >> >> tasks = asyncio.Task.all_tasks(loop) >> >> This creates a strong reference to each of the returned tasks. > > Good catch!
And demonstrates somewhat of a pitfall with weak references (which I have never used). Weak references are not as weak as they are thought to be. Marko -- https://mail.python.org/mailman/listinfo/python-list