Setuav Studio Developer Documentation 1.0
SDK and plugin development reference for Setuav Studio
Loading...
Searching...
No Matches
setuav_studio_sdk.tasks.TaskManagerProtocol Class Reference

Central background task manager contract exposed to plugins. More...

Inherits Protocol.

Collaboration diagram for setuav_studio_sdk.tasks.TaskManagerProtocol:

Public Member Functions

TaskHandle[T] submit (self, str name, Callable[[CancellationToken], T] target, *TaskPriority priority=TaskPriority.NORMAL, Callable[[T], None]|None on_finished=None, Callable[[Exception], None]|None on_error=None, Callable[[TaskProgress], None]|None on_progress=None, Callable[[], None]|None on_cancelled=None)
 Submit a callable to the background thread pool.
 
bool cancel (self, str task_id)
 Cancel a task by its identifier.
 
None cancel_all (self)
 Cancel all running and pending tasks.
 
TaskHandle[Any]|None get_task (self, str task_id)
 Retrieve task handle by ID.
 
tuple[TaskHandle[Any],...] active_tasks (self)
 Tuple of active running and pending tasks.
 
tuple[TaskHandle[Any],...] recent_tasks (self, int limit=50)
 Tuple of recent tasks including finished, failed and cancelled.
 
None clear_history (self)
 Clear finished, failed and cancelled tasks from history.
 

Detailed Description

Central background task manager contract exposed to plugins.