mantidimaging.gui.dialogs.async_task.task module#

class mantidimaging.gui.dialogs.async_task.task.TaskWorkerThread(parent=None)[source]#

Bases: QThread

Thread for running tasks asynchronously to the GUI.

Intended for internal use within this module only.


t = TaskWorkerThread(parent) t.task_function = … t.finished.connect(…) t.start()

On completion inspect:

t.result t.error

error: Exception | None#
task_function: Callable | None#
was_successful() bool[source]#

Inspects the result and error values of the async task.

For a task to be “successful” the result must have a value and the error must be None.


True if task finished successfully