client.py 文件源码

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

项目:caproto 作者: NSLS-II 项目源码 文件源码
def disconnect(self, *, wait=True, timeout=2.0):
        for cid, ch in list(self.channels.items()):
            ch.disconnect(wait=wait, timeout=timeout)
            self.channels.pop(cid)

        with self.new_command_cond:
            self.circuit.disconnect()
        sock = self.socket
        if sock is not None:
            self.selector.remove_socket(sock)
            try:
                sock.shutdown(socket.SHUT_WR)
                sock.close()
            except OSError:
                pass
            self.socket = None

        self.channels.clear()
        self.ioids.clear()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号