()
| 78 | error_box: list = [] |
| 79 | |
| 80 | def _run_in_thread() -> None: |
| 81 | tmp_loop = asyncio.new_event_loop() |
| 82 | try: |
| 83 | result_box.append(tmp_loop.run_until_complete(coro)) |
| 84 | except BaseException as exc: |
| 85 | error_box.append(exc) |
| 86 | finally: |
| 87 | tmp_loop.close() |
| 88 | |
| 89 | t = threading.Thread(target=_run_in_thread, daemon=True) |
| 90 | t.start() |