def run(self):
        self.has_exit = False
        self._legacy_setup()

        platform_event_loop = app.platform_event_loop
        platform_event_loop.start()
        self.dispatch_event('on_enter')

        if True: # TODO runtime option.
            self._run_estimated()
        else:
            self._run()
            
        self.dispatch_event('on_exit')
        platform_event_loop.stop()
Begin processing events, scheduled functions and window updates.
dataset/ETHPy150Open ardekantur/pyglet/pyglet/app/base.py/EventLoop.run