MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / __init__

Method __init__

openlibrary/utils/async_utils.py:21–24  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19
20class AsyncBridge:
21 def __init__(self):
22 self._loop = asyncio.new_event_loop()
23 self._thread = threading.Thread(target=self._loop.run_forever, daemon=True)
24 self._thread.start()
25
26 def run[T](self, coro: Coroutine[Any, Any, T]) -> T:
27 return asyncio.run_coroutine_threadsafe(coro, self._loop).result()

Callers

nothing calls this directly

Calls 1

startMethod · 0.80

Tested by

no test coverage detected