Executor component manager
This module provides an abstract component manager for SKA Tango base devices.
- class TaskExecutorComponentManager(*args: Any, max_queue_size: int = 32, **kwargs: Any)[source]
A component manager with support for asynchronous tasking.
- submit_task(func: Callable[[...], None], args: Any | None = None, kwargs: Any | None = None, is_cmd_allowed: Callable[[], bool] | None = None, task_callback: TaskCallbackType | None = None) tuple[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: TaskCallbackType | None = None) tuple[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