def run_coro_when_free(self, coro: Awaitable) -> None: while self._loop.is_running(): time.sleep(.01) self._loop.run_until_complete(coro)