Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def new_event_loop(self):
if self._default and isinstance(threading.current_thread(), threading._MainThread):
l = self.get_default_loop()
elif self._full:
l = GLibEventLoop()
else:
l = unix_events.DefaultEventLoopPolicy.new_event_loop(self._policy)
return l