Closed
Description
It seems asyncio
is not supported yet? I get the following error while importing it:
semantic error: Could not find the module 'asyncio'. If an import path is available, please use the `-I` option to specify it
As a workaround, I wanted to try this simple coroutine runner:
async def main():
print("done")
def run_async_fn(async_fn, *args, **kwargs):
coro = async_fn(*args, **kwargs)
try:
coro.send(None)
except StopIteration as exc:
return exc.value
else:
raise RuntimeError("Cannot run async function")
run_async_fn(main)
But I get:
Internal Compiler Error: Unhandled exception