Worker
@author: L. Calvo-Bartolome
- class src.graphical_user_interface.worker.Worker(fn, *args, **kwargs)
Bases:
QRunnable
Module that inherits from QRunnable and is used to handler worker thread setup, signals and wrap-up. It has been created based on the analogous class provided by: https://www.pythonguis.com/tutorials/multithreading-pyqt-applications-qthreadpool/.
- __init__(fn, *args, **kwargs)
Initializes the application’s main window based on the parameters received from the application’s starting window.
- Parameters
callback (UDF) – The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner.
callback (UDF) – Function
args (list) – Arguments to pass to the callback function
kwargs (dict) – Keywords to pass to the callback function
- run()
Initialises the runner function with passed args, kwargs.