pub struct TaskManager { /* private fields */ }👎Deprecated: use ShutdownManager instead
Expand description
Listens to status and error messages from tasks, as well as notifying them to gracefully shutdown. Keeps track of if task stop unexpectedly, such as in a panic.
Implementations§
Source§impl TaskManager
impl TaskManager
pub fn new(shutdown_timer_secs: u64) -> Self
pub fn named<S: Into<String>>(self, name: S) -> Self
pub async fn catch_interrupt( &mut self, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn subscribe(&self) -> TaskClient
pub fn subscribe_named<S: Into<String>>(&self, suffix: S) -> TaskClient
pub fn signal_shutdown(&self) -> Result<(), SendError<()>>
pub async fn start_status_listener( &mut self, sender: StatusSender, start_status: TaskStatus, )
pub async fn wait_for_error(&mut self) -> Option<Box<dyn Error + Send + Sync>>
pub async fn wait_for_graceful_shutdown(&mut self)
pub async fn wait_for_shutdown(&mut self)
Trait Implementations§
Source§impl Debug for TaskManager
impl Debug for TaskManager
Source§impl Default for TaskManager
impl Default for TaskManager
Source§impl From<TaskManager> for TaskHandle
impl From<TaskManager> for TaskHandle
Source§fn from(value: TaskManager) -> Self
fn from(value: TaskManager) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TaskManager
impl !RefUnwindSafe for TaskManager
impl Send for TaskManager
impl Sync for TaskManager
impl Unpin for TaskManager
impl !UnwindSafe for TaskManager
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