sequential.py 文件源码

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

项目:zoonado 作者: wglass 项目源码 文件源码
def wait_on_sibling(self, sibling, time_limit=None):
        log.debug("Waiting on sibling %s", sibling)

        path = self.sibling_path(sibling)

        unblocked = self.client.wait_for_event(WatchEvent.DELETED, path)
        if time_limit:
            unblocked = gen.with_timeout(time_limit, unblocked)

        exists = yield self.client.exists(path=path, watch=True)
        if not exists:
            unblocked.set_result(None)

        try:
            yield unblocked
        except gen.TimeoutError:
            raise exc.TimeoutError
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号