pub struct AsyncTaskManager { /* private fields */ }
Expand description
Async task manager
Implementations§
Source§impl AsyncTaskManager
impl AsyncTaskManager
pub fn new() -> Self
pub fn spawn_task<F>(&mut self, name: &str, future: F) -> &TaskHandle
pub fn get_active_task_count(&self) -> usize
pub fn is_task_running(&self, name: &str) -> bool
pub fn get_task_names(&self) -> Vec<String>
pub fn get_running_task_names(&self) -> Vec<String>
pub async fn cancel_task(&mut self, name: &str)
pub async fn wait_for_task_completion(&self, name: &str) -> Result<(), McpError>
pub async fn shutdown_all_tasks( &mut self, _timeout: Duration, ) -> Result<(), McpError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncTaskManager
impl RefUnwindSafe for AsyncTaskManager
impl Send for AsyncTaskManager
impl Sync for AsyncTaskManager
impl Unpin for AsyncTaskManager
impl UnwindSafe for AsyncTaskManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more