def __init__(self, socketpath, name, rpc_host): QuittableThread.__init__(self) self.socketpath = socketpath self.socket = None self.name = name self.rpc_host = rpc_host self.rpc_host.node_id = 0
def __init__(self, exec_file, *args, **kwargs): from mfp import log QuittableThread.__init__(self) self.exec_file = exec_file self.exec_args = list(args) self.process = None if "log_module" in kwargs: self.log_module = kwargs["log_module"] else: self.log_module = log.log_module if kwargs.get("log_raw"): self.log_raw = True else: self.log_raw = False
def __init__(self, exec_file, *args, **kwargs): from mfp import log QuittableThread.__init__(self) self.exec_file = exec_file self.exec_args = list(args) self.process = None if kwargs.has_key("log_module"): self.log_module = kwargs["log_module"] else: self.log_module = log.log_module if kwargs.get("log_raw"): self.log_raw = True else: self.log_raw = False
def __init__(self, status_cb=None): QuittableThread.__init__(self) # FIXME -- one lock/condition per RPCHost means lots of # unneeded waking up if lots of requests are queued self.lock = threading.Lock() self.condition = threading.Condition(self.lock) self.pending = {} self.node_id = None self.fdsockets = {} self.status_cb = status_cb self.served_classes = {} self.managed_sockets = {} self.peers_by_socket = {} self.read_workers = WorkerPool(self.dispatch_rpcdata)