MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / coro_fn

Function coro_fn

tests/python/test_event_loop.py:172–174  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

170
171 # 2. Python asyncio.Task to JS promise
172 async def coro_fn(x):
173 await asyncio.sleep(0.01)
174 return x
175 task = loop.create_task(coro_fn("from a Task"))
176 assert type(task) is asyncio.Task
177 assert type(task) is not asyncio.Future

Callers 1

async_fnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected