def stop(self):
            # Technically not thread-safe but close enough for now
            process_thread = self.process_thread
            self.process_thread = None

            if process_thread != None:
                process_thread.stop()
                process_thread.join(self.TIMEOUT)
                if process_thread.isAlive():
                    raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
            Device.stop(self)
コード例 #2
0
    def stop(self):
        # Technically not thread-safe but close enough for now
        process_thread = self.process_thread
        self.process_thread = None

        if process_thread != None:
            process_thread.stop()
            process_thread.join(self.TIMEOUT)
            if process_thread.isAlive():
                raise CF.Resource.StopError(CF.CF_NOTSET,
                                            "Processing thread did not die")
        Device.stop(self)
コード例 #3
0
    def stop(self):
        self.threadControlLock.acquire()
        try:
            process_thread = self.process_thread
            self.process_thread = None

            if process_thread != None:
                process_thread.stop()
                process_thread.join(self.TIMEOUT)
                if process_thread.isAlive():
                    raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
            Device.stop(self)
        finally:
            self.threadControlLock.release()
コード例 #4
0
        def stop(self):
            self.threadControlLock.acquire()
            try:
                process_thread = self.process_thread
                self.process_thread = None

                if process_thread != None:
                    process_thread.stop()
                    process_thread.join(self.TIMEOUT)
                    if process_thread.isAlive():
                        raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
                Device.stop(self)
            finally:
                self.threadControlLock.release()
コード例 #5
0
 def stop(self):
     Device.stop(self)
     if not ThreadedComponent.stopThread(self, self.TIMEOUT):
         raise CF.Resource.StopError(CF.CF_NOTSET,
                                     "Processing thread did not die")
コード例 #6
0
 def stop(self):
     Device.stop(self)
     if not ThreadedComponent.stopThread(self, self.TIMEOUT):
         raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")