def event_loop(self):
        """ Run the event loop once. """
        if hasattr(self.loop, '._run_once'):
            self.loop._thread_id = threading.get_ident()
            try:
                self.loop._run_once()
            finally:
                self.loop._thread_id = None
        else:
            self.loop.call_soon(self.loop.stop)
            self.loop.run_forever()
def event_loop ( self ) : if hasattr ( self . loop , '._run_once' ) : self . loop . _thread_id = threading . get_ident ( ) try : self . loop . _run_once ( ) finally : self . loop . _thread_id = None else : self . loop . call_soon ( self . loop . stop ) self . loop . run_forever ( )
Run the event loop once.