is cancelled now")
随着等待asyncio.sleep(1),我们有:# ---------------cancel_me(): cancel sleep# main(): cancel_me is cancelled now
无需等待编辑(作为对下面评论的反应):那么,await asyncio.sleep允许启动其他任务吗?这
在这里完成newb,阅读有关的信息,其中包含以下示例:import time
await asyncio.sleepawait的理解是,它会阻塞当前函数的执行,并等待异步函数返回。进一步的调查,通过在say_after中添加额外的print,在我看来,协程在await发生之前是不会开始的……import time
async def say_af