小编Max*_*ond的帖子

`asyncio.sleep(delay)` 是否保证睡眠至少 `delay` 秒?

asyncio.sleep()\ 的阻塞表兄弟time.sleep()不能保证它会休眠所请求的时间。

\n
\n

实际的挂起时间可能小于请求的时间,因为任何捕获的信号都将在执行该信号\xe2\x80\x99s 捕获例程后终止 sleep() 。

\n
\n

asyncio.sleep()\ 的文档没有提到类似的限制。

\n

是否asyncio.sleep()能够对其休眠时间做出更有力的保证?

\n

python python-asyncio

3
推荐指数
1
解决办法
3482
查看次数

标签 统计

python ×1

python-asyncio ×1