-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f04b4e
commit 0bdb143
Showing
1 changed file
with
3 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0bdb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I avoided this solution because asyncio.get_event_loop does not necessarily returns the same loop we are running on, and so may cause some confusion.
0bdb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is quite common a user has to specify the loop they wants an async function to be run in.
get_event_loop
returns the current running loop in the current running thread first if possible, otherwise creates one then returns it. I don't see a use case that this solution will not be fit it. Can you please give an example?