hub.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Lixiang_zhaoxin 作者: hejaxian 项目源码 文件源码
def idle(priority=0):
    """
    Cause the calling greenlet to wait until the event loop is idle.

    Idle is defined as having no other events of the same or higher
    *priority* pending. That is, as long as sockets, timeouts or even
    signals of the same or higher priority are being processed, the loop
    is not idle.

    .. seealso:: :func:`sleep`
    """
    hub = get_hub()
    watcher = hub.loop.idle()
    if priority:
        watcher.priority = priority
    hub.wait(watcher)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号