[docs] [issue28212] Closing server in asyncio is not efficient

Константин Волков report at bugs.python.org
Tue Sep 20 12:33:13 EDT 2016


Константин Волков added the comment:

Attached file with test example. There in "ping" task "except" and "finally" sections never called as expected (but code inside "try" will work).
Server is closed while client connection is active, and it just removes reading task from loop. You can still find it through Task.all_tasks(), but it is weakref array. So, sometime later GC will simply delete this task and no finalization will be performed.

----------
Added file: http://bugs.python.org/file44756/task_example.py

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


More information about the docs mailing list