ListCommunication.py 文件源码

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

项目:CellsCycle 作者: AQuadroTeam 项目源码 文件源码
def send_int_message(self, msg=b'ALIVE', timeout=TRACKER_INFINITE_TIMEOUT):

        try:
            self.logger.debug('sending message to {}'.format(self.sync_address))
            tracker_object = self.list_communication_channel.send(msg, track=True, copy=False)
            # wait forever
            tracker_object.wait(timeout)
            # self.logger.debug('ok with the message')
        except zmq.NotDone:
            self.logger.debug('Something went wrong with that message')
            time.sleep(TRY_TIMEOUT)
            # self.logger.debug('Sleep finished')
            # self.list_communication_channel.close()
        except zmq.ZMQError as a:
            self.logger.debug(a.strerror)
            self.context.destroy()
            self.context = zmq.Context()
            self.generate_internal_channel_client_side()

    # used when it's the first time to sync
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号