[issue26520] asyncio.new_event_loop() hangs

Erwin Mayer report at bugs.python.org
Thu Mar 10 13:31:34 EST 2016


Erwin Mayer added the comment:

Thank you Guido; I am now trying to always close a loop explicitly and see if it fixes the issue (so far so good in the last 24h). 

I could not locate this requirement in the EventLoop documentation page (https://docs.python.org/3/library/asyncio-eventloop.html), however it was indeed mentioned in the "Develop with asyncio" documentation page (https://docs.python.org/3/library/asyncio-dev.html#asyncio-close-transports), saying that otherwise a Resource warning would be emitted (if debug mode was turned on).
It could be beneficial to remind the need to close the loop explicitly in the EventLoop page as well. I saw a lot of people posting code snippets not doing it. I'll check how I can submit a patch for that.

I agree with your comments on the reproductibility of my issue, I was hoping the stack trace could be enough to pinpoint reasons of why a socket creation could be hanging (and maybe diagnose a bug).

----------

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


More information about the Python-bugs-list mailing list