摘要: import asyncio import time 1.定义协程对象 async def hello(x): # time.sleep(x) # time.sleep是一个同步操作语句,无法达到异步的结果 print('-222-', x) await asyncio.sleep(x) retur 阅读全文
posted @ 2024-05-04 14:30 星空28 阅读(3) 评论(0) 推荐(0) 编辑