(self)
Close the event loop.

        This clears the queues and shuts down the executor,
        but does not wait for the executor to finish.

        The event loop must not be running.
Close the event loop.
Close the event loop .
def close(self):
        """Close the event loop.

        This clears the queues and shuts down the executor,
        but does not wait for the executor to finish.

        The event loop must not be running.
        """
        if self.is_running():
            raise RuntimeError("Cannot close a running event loop")
        if self._closed:
            return
        if self._debug:
            logger.debug("Close %r", self)
        self._closed = True
        self._ready.clear()
        self._scheduled.clear()
        self._executor_shutdown_called = True
        executor = self._default_executor
        if executor is not None:
            self._default_executor = None
            executor.shutdown(wait=False)
def close ( self ) : if self . is_running ( ) : raise RuntimeError ( "Cannot close a running event loop" ) if self . _closed : return if self . _debug : logger . debug ( "Close %r" , self ) self . _closed = True self . _ready . clear ( ) self . _scheduled . clear ( ) self . _executor_shutdown_called = True executor = self . _default_executor if executor is not None : self . _default_executor = None executor . shutdown ( wait = False )