本站改版新增arduino频道
asyncio
import uasyncio as asyncio async def some_fn(caller, delay): print('some_fn called by', caller) await asyncio.sleep(delay) print('some_fn is finished') async def main(): asyncio.create_task(some_fn('main program', 2)) print('main program called some_fn & continues') await asyncio.sleep(3) print('main program still running') asyncio.run(main())
Copyright © 2014 ESP56.com All Rights Reserved
晋ICP备14006235号-22 晋公网安备14108102001165号
执行时间: 0.0096559524536133 seconds