(self)
Reimplemented from `QRunnable.run`
Reimplemented from `QRunnable.run`
Reimplemented from QRunnable . run
def run(self):
        """
        Reimplemented from `QRunnable.run`
        """
        self.eventLoop = QEventLoop()
        self.eventLoop.processEvents()

        # Move the task to the current thread so it's events, signals, slots
        # are triggered from this thread.
        assert self.task.thread() is _TaskDepotThread.instance()

        QMetaObject.invokeMethod(
            self.task.thread(), "transfer", Qt.BlockingQueuedConnection,
            Q_ARG(object, self.task),
            Q_ARG(object, QThread.currentThread())
        )

        self.eventLoop.processEvents()

        # Schedule task.run from the event loop.
        self.task.start()

        # Quit the loop and exit when task finishes or is cancelled.
        self.task.finished.connect(self.eventLoop.quit)
        self.task.cancelled.connect(self.eventLoop.quit)
        self.eventLoop.exec()
def run ( self ) : self . eventLoop = QEventLoop ( ) self . eventLoop . processEvents ( ) # Move the task to the current thread so it's events, signals, slots # are triggered from this thread. assert self . task . thread ( ) is _TaskDepotThread . instance ( ) QMetaObject . invokeMethod ( self . task . thread ( ) , "transfer" , Qt . BlockingQueuedConnection , Q_ARG ( object , self . task ) , Q_ARG ( object , QThread . currentThread ( ) ) ) self . eventLoop . processEvents ( ) # Schedule task.run from the event loop. self . task . start ( ) # Quit the loop and exit when task finishes or is cancelled. self . task . finished . connect ( self . eventLoop . quit ) self . task . cancelled . connect ( self . eventLoop . quit ) self . eventLoop . exec ( )