Created
November 13, 2020 10:13
-
-
Save leopard627/000e44682c18145e947100ac2a2f9d62 to your computer and use it in GitHub Desktop.
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
# asyncio/events.py in get_event_loop at line 602 | |
not self._local._set_called and | |
isinstance(threading.current_thread(), threading._MainThread)): | |
self.set_event_loop(self.new_event_loop()) | |
if self._local._loop is None: | |
raise RuntimeError('There is no current event loop in thread %r.' | |
% threading.current_thread().name) | |
return self._local._loop | |
def set_event_loop(self, loop): | |
"""Set the event loop.""" | |
self._local._set_called = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment