server.py 文件源码

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

项目:python-zcm 作者: pranav-srinivas-kumar 项目源码 文件源码
def __init__(self, name, priority, actor_context, endpoints, 
                 operation_function, operation_queue):
        """
        Create a server

        Keyword arguments:
        name - Name of the timer
        priority - Priority of the subscriber
        actor_context - ZMQ context of the actor process
        endpoints - A list of endpoint strings
        operation_function - Operation function of the subscriber
        operation_queue - The operation queue object
        """
        self.name = name
        self.priority = priority
        self.endpoints = endpoints
        self.operation_function = operation_function
        self.operation_queue = operation_queue
        self.context = actor_context
        self.server_socket = self.context.socket(zmq.REP)
        for endpoint in self.endpoints:
            self.server_socket.bind(endpoint)
        self.ready = True
        self.func_mutex = Lock()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号