A class for a Qt-enabled python Thread.
- class natcap.invest.ui.execution.Executor(target, args=None, kwargs=None, log_events=True)¶
A thread of control that will emit a Qt signal when finished.
- finished = <MagicMock name='mock.QtCore.Signal()' id='140108894629760'>¶
Run the target callable in a separate thread of control.
The callable will be run with whatever
kwargsare provided to the thread’s
If an exception is encountered while executing the target, several things happen:
The exception is logged.
self.failedis set to
self.exceptionrefers to the exception object that was raised.
self.tracebackrefers to the formatted traceback.
Finally, the signal
self.finishedis emitted, regardless of whether an exception was raised.