← Back to workers
CallableWorker¶
Source: Distributed_Design_Optimizer/postprocess/workers/CallableWorker.py
Base class for simple background workers that run a callable and emit results.
Classes¶
CallableWorker¶
Inherits from:
QThreadGeneric background worker that invokes a callable and emits the result.
Subclasses override
_handle_resultto route the return value to their typed signals.
Methods¶
init(self, fn, args: tuple, parent: QObject | None) → None
Initialize the callable worker.
Args:
fn: The callable to execute in the background thread.
args: Positional arguments to pass to the callable.
parent: Optional parent QObject.
run(self) → None
Execute the callable and route the result or emit an error.