Andrew Svetlov <andrew.svet...@gmail.com> added the comment:

I think now it is too late for changing the behavior.
In the ideal world, get_event_loop() should never exist, maybe we can 
deprecate/remove it eventually.
run() should be used for executing async code; get_running_loop() for getting a 
reference to the currently executed loop.
It may help to avoid many silly problems.
Maybe some scenarios are not covered but at least high-level code can be 
organized this way.

P.S.
set_event_loop(None) is not for resetting to default but for disabling of the 
default loop creation for the current thread. Non-main threads work like 
set_event_loop(None) was called implicitly.

----------

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

Reply via email to