diff --git a/uvloop/__init__.py b/uvloop/__init__.py index 638b874c..ca906cf4 100644 --- a/uvloop/__init__.py +++ b/uvloop/__init__.py @@ -203,10 +203,7 @@ def get_event_loop(self) -> _AbstractEventLoop: Returns an instance of EventLoop or raises an exception. """ if self._local._loop is None: - raise RuntimeError( - 'There is no current event loop in thread %r.' - % threading.current_thread().name - ) + self._local._loop = self._loop_factory() return self._local._loop