MCPcopy
hub / github.com/volcengine/OpenViking / _run_in_thread

Function _run_in_thread

openviking_cli/utils/async_utils.py:80–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected