connection.py 文件源码

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

项目:zoonado 作者: wglass 项目源码 文件源码
def close(self, timeout):
        if self.closing:
            return

        self.closing = True

        pending_with_timeouts = []
        for pending in self.drain_all_pending():
            pending_with_timeouts.append(gen.with_timeout(timeout, pending))

        try:
            yield list(pending_with_timeouts)
        except gen.TimeoutError:
            yield self.abort(exception=exc.TimeoutError)
        finally:
            self.stream.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号