Sleep in python asyncio
2017-05-01 本文已影响29人
hzmangel
- Do not use
time.sleep
, or the whole program will be hang. Usesasyncio.sleep
instead. - Remember to add
await
in front ofasyncio.sleep
- Of course, warp code in
async
block as a corouting
time.sleep
, or the whole program will be hang. Uses asyncio.sleep
instead.await
in front of asyncio.sleep
async
block as a corouting