napari.qt.threading.WorkerBase#
- class napari.qt.threading.WorkerBase(func: ~typing.Callable[[~_P], ~superqt.utils._qthreading._R] | None = None, SignalsClass: type[~superqt.utils._qthreading.WorkerBaseSignals] = <class 'superqt.utils._qthreading.WorkerBaseSignals'>)[source]#
Bases:
QRunnable,Generic[_R]Base class for creating a Worker that can run in another thread.
Methods
autoDelete(self)await_workers([msecs])Ask all workers to quit, and wait up to msec for quit.
create(functionToRun)quit()Send a request to abort the worker.
run()Start the worker.
setAutoDelete(self, _autoDelete)start()Start this worker in a thread and add it to the global threadpool.
work()Main method to execute the worker.
Attributes
Whether the worker has been requested to stop.
Whether the worker has been started.
Details