Executor component manager
This module provides an abstract component manager for SKA Tango base devices.
- class TaskExecutorComponentManager(*args: Any, max_workers: int | None = 1, max_queue_size: int = 10, **kwargs: Any)[source]
A component manager with support for asynchronous tasking.
- submit_task(func: Callable[[...], None], args: Optional[Any] = None, kwargs: Optional[Any] = None, is_cmd_allowed: Optional[Callable[[], bool]] = None, task_callback: Optional[TaskCallbackType] = None) tuple[ska_control_model.task_status.TaskStatus, str][source]
Submit a task to the task executor.
- Parameters:
func – function/bound method to be run
args – positional arguments to the function
kwargs – keyword arguments to the function
is_cmd_allowed – sanity check for func
task_callback – callback to be called whenever the status of the task changes.
- Returns:
tuple of taskstatus & message
- abort_commands(task_callback: Optional[TaskCallbackType] = None) tuple[ska_control_model.task_status.TaskStatus, str][source]
Tell the task executor to abort all tasks.
- Parameters:
task_callback – callback to be called whenever the status of this abort task changes.
- Returns:
tuple of taskstatus & message