circuitpython/tests/extmod/uasyncio_basic2.py
2023-08-22 12:57:47 -04:00

22 lines
337 B
Python

try:
import asyncio
except ImportError:
print("SKIP")
raise SystemExit
async def forever():
print("forever start")
await asyncio.sleep(10)
async def main():
print("main start")
asyncio.create_task(forever())
await asyncio.sleep(0.001)
print("main done")
return 42
print(asyncio.run(main()))