astra.thread_manager#
Thread management for device operations within the Astra framework.
- Key capabilities:
Start and manage threads for device operations
Track thread status and provide summaries
Safely stop and clean up threads
Classes
Manages threads for device operations within the Astra framework. |
- class astra.thread_manager.ThreadManager[source]#
Bases:
objectManages threads for device operations within the Astra framework.
- start_thread(target: Callable, args: tuple = (), thread_type: str = '', device_name: str = '', thread_id: Any = None, daemon: bool = True) Thread[source]#
Start a new thread for the specified target function.
- get_thread(thread_id: Any) Thread | None[source]#
Return the thread object for the specified thread ID, or None if not found.
- stop_thread(thread_id: Any) None[source]#
Stop and remove the specified thread from the threads list.