RodTracker.backend.parallelism
Classes used in RodTracked GUI for parallel thread work (some lengthy computations/data loading is performed outside of the main thread).
Author: Adrian Niemann (adrian.niemann@ovgu.de)
Date: 2022-2024
- class Worker(func, *args, **kwargs)[source]
Bases:
QRunnableWrapper object for a function that shall be run in a thread other than the main thread.
- Parameters:
- func
Function to be run in a thread other than the main thread.
- Type:
callable
- class WorkerSignals[source]
Bases:
QObjectHelper object to provide
Workeraccess topyqtSignal.
- error_handler(func)[source]
Decorator function to provide proper error handling.
This function is intended as a wrapper for the QRunnable.run() function. It assumes that the QRunnable object has an attribute self.signals.error which is a pyqtSignal that expects the exception type, value, and traceback as its values.
See also