def finish(self): from mfp import log p = self.process self.process = None if p is not None: try: p.terminate() p.wait() except OSError as e: pass self.quit_req = True QuittableThread.finish(self)
def finish(self): from mfp import log p = self.process self.process = None if p is not None: try: p.terminate() p.wait() except OSError as e: pass self.quit_req = True QuittableThread.finish(self)
self.process.terminate() self.process.wait() def finish(self): from mfp import log p = self.process self.process = None if p is not None: try: p.terminate() p.wait() except OSError, e: pass self.quit_req = True QuittableThread.finish(self) def alive(self): if not self.process: return False else: return not self.process.poll() class RPCMultiRemote (object): ''' RPCMultiRemote -- launch a process with multiprocessing which will connect back to this process ''' def __init__(self, thunk, *args): self.thunk = thunk self.args = args
self.process.wait() def finish(self): from mfp import log p = self.process self.process = None if p is not None: try: p.terminate() p.wait() except OSError, e: log.warning( "RPCExecRemote: caught error in terminate(), continuing") self.quit_req = True QuittableThread.finish(self) def alive(self): if not self.process: return False else: return not self.process.poll() class RPCMultiRemote(object): ''' RPCMultiRemote -- launch a process with multiprocessing which will connect back to this process ''' def __init__(self, thunk, *args): self.thunk = thunk