MCPcopy Index your code
hub / github.com/ipython/ipython / in_thread

Method in_thread

IPython/core/magics/script.py:218–220  ·  view source on GitHub ↗

Call a coroutine on the asyncio thread

(coro)

Source from the content-addressed store, hash-verified

216 event_loop = self.event_loop
217
218 def in_thread(coro):
219 """Call a coroutine on the asyncio thread"""
220 return asyncio.run_coroutine_threadsafe(coro, event_loop).result()
221
222 async def _readchunk(stream):
223 try:

Callers

nothing calls this directly

Calls 1

resultMethod · 0.80

Tested by

no test coverage detected