예제 #1
0
파일: app.py 프로젝트: linbaba222/PyTools
    def main_loop(self):
        # Main loop is a no-op on iOS; the app loop is integrated with the
        # main iOS event loop.

        # The rest of this method will eventually be wrapped into
        # rubicon as the method `run_forever_cooperatively()`.
        # self.loop.run_forever_cooperatively(lifecycle=iOSLifecycle())
        # ==== start run_forever_cooperatively()
        self.loop._set_lifecycle(iOSLifecycle())

        if self.loop.is_running():
            raise RuntimeError(
                "Recursively calling run_forever is forbidden. "
                "To recursively run the event loop, call run().")

        self.loop._running = True
        from asyncio import events
        if hasattr(events, "_set_running_loop"):
            events._set_running_loop(self.loop)

        self.loop._lifecycle.start()
예제 #2
0
    def main_loop(self):
        # Main loop is a no-op on iOS; the app loop is integrated with the
        # main iOS event loop.

        self.loop.run_forever(lifecycle=iOSLifecycle())
예제 #3
0
파일: app.py 프로젝트: pybee/toga
    def main_loop(self):
        # Main loop is a no-op on iOS; the app loop is integrated with the
        # main iOS event loop.

        self.loop.run_forever(lifecycle=iOSLifecycle())