def processRequests(self): try: RemoteEventHandler.processRequests(self) except ClosedError: from pyqtgraph.Qt import QtGui, QtCore QtGui.QApplication.instance().quit() self.timer.stop()
def startEventLoop(name, port, authkey): conn = multiprocessing.connection.Client(('localhost', int(port)), authkey=authkey) global HANDLER HANDLER = RemoteEventHandler(conn, name, os.getppid()) while True: try: HANDLER.processRequests() # exception raised when the loop should exit time.sleep(0.01) except ClosedError: break