Struct tokio_task_tracker::TaskWaiter
source · pub struct TaskWaiter { /* private fields */ }
Expand description
TaskWaiter is used to wait until all task trackers have been dropped.
Implementations§
source§impl TaskWaiter
impl TaskWaiter
sourcepub async fn wait_for_shutdown(self, timeout: Duration) -> Result<(), Error>
pub async fn wait_for_shutdown(self, timeout: Duration) -> Result<(), Error>
Wait for the application to be interrupted, and then gracefully shutdown allowing a timeout for all tasks to quit. A second interrupt will cause an immediate shutdown.
On Unix systems, “interrupt” means a SIGINT or SIGTERM. On all other
platforms the current implementation uses tokio::signal::ctrl_c()
to wait for an interrupt.
Auto Trait Implementations§
impl Freeze for TaskWaiter
impl !RefUnwindSafe for TaskWaiter
impl Send for TaskWaiter
impl Sync for TaskWaiter
impl Unpin for TaskWaiter
impl !UnwindSafe for TaskWaiter
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