proposer.py 文件源码

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

项目:p4paxos-demo 作者: usi-systems 项目源码 文件源码
def datagramReceived(self, datagram, address):
        """
        Receive response from Paxos Learners, match the response with the original 
        request and pass it to the application handler.
        """
        try:
            fmt = '>' + 'B {0}s'.format(VALUE_SIZE)
            packer = struct.Struct(fmt)
            packed_size = struct.calcsize(fmt)
            unpacked_data = packer.unpack(datagram[:packed_size])
            req_id, result =  unpacked_data
            self.defers[req_id].callback(result)
            pass
        except defer.AlreadyCalledError as ex:
            #logging.error("already call")
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号