(cls)
| 90 | |
| 91 | @classmethod |
| 92 | def StartLoop(cls): |
| 93 | if cls._loop is not None: |
| 94 | cls._logger.warning("Loop is already started") |
| 95 | return |
| 96 | |
| 97 | if cls._loop is None: |
| 98 | cls._loop = asyncio.new_event_loop() |
| 99 | |
| 100 | def run_loop(): |
| 101 | asyncio.set_event_loop(cls._loop) |
| 102 | cls._logger.debug("Starting the asyncio loop") |
| 103 | cls._loop.run_forever() |
| 104 | |
| 105 | cls._thread = threading.Thread(target=run_loop) |
| 106 | cls._thread.start() |
| 107 | |
| 108 | @classmethod |
| 109 | def StopLoop(cls): |