Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
            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
Beispiel #4
0
            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