p2p_scheduler.py 文件源码

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

项目:ez-segway 作者: thanh-nguyen-dang 项目源码 文件源码
def suspect_deadlock_on_link(self, link):
        if len(link.to_adds) + len(link.to_adds_loop) == 0:
            return
        suspecting_start = time()
        self.suspecting_deadlocks[(link.src, link.dst)] = suspecting_start
        link.scheduling_mode = constants.SUSPECTING_LINK
        # self.log.info("can_violate_congestion: %s" % self.can_violate_congestion)
        # self.log.info("segments to be done %s" % self.segments_to_be_done)
        if not self.can_violate_congestion:
            eventlet.spawn_after(constants.SUSPECTING_TIME, self.suspecting_time_expire, (link.src, link.dst))
        else:
            self.suspecting_deadlock_for_this_test = True
            eventlet.spawn_after(constants.SUSPECTING_TIME_SKIP_DEADLOCK, self.skipping_deadlock)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号