def close(self):
if self.is_running():<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>if self.is_closed():<EOL><INDENT>return<EOL><DEDENT>self._logger.debug('<STR_LIT>')<EOL>if self.__default_executor is not None:<EOL><INDENT>self.__default_executor.shutdown()<EOL><DEDENT>super().close()<EOL>self._timer.stop()<EOL>self.__app = None<EOL>for notifier in itertools.chain(self._read_notifiers.values(), self._write_notifiers.values()):<EOL><INDENT>notifier.setEnabled(False)<EOL><DEDENT>self._read_notifiers = None<EOL>self._write_notifiers = None<EOL>
Release all resources used by the event loop.

The loop cannot be restarted after it has been closed.