Andrew Svetlov <> 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.

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 <>
Python-bugs-list mailing list

Reply via email to