pub struct BackgroundMaintenanceQueue { /* private fields */ }Expand description
Bounded queue for post-turn maintenance that can be flushed by eval and shutdown paths.
Implementations§
Source§impl BackgroundMaintenanceQueue
impl BackgroundMaintenanceQueue
Sourcepub fn spawn<F>(
&self,
key: Option<MaintenanceSequenceKey>,
future: F,
) -> Result<()>
pub fn spawn<F>( &self, key: Option<MaintenanceSequenceKey>, future: F, ) -> Result<()>
Spawns a background task and applies per-key ordering when a key is supplied.
Sourcepub async fn flush_all(&self) -> Result<()>
pub async fn flush_all(&self) -> Result<()>
Waits for all tracked background tasks to complete.
Sourcepub async fn flush_scope(&self, scope_id: &str) -> Result<()>
pub async fn flush_scope(&self, scope_id: &str) -> Result<()>
Waits for tasks with the requested scope identifier and keeps unrelated work queued.
Sourcepub async fn flush_purpose(&self, purpose: RuntimeTaskPurpose) -> Result<()>
pub async fn flush_purpose(&self, purpose: RuntimeTaskPurpose) -> Result<()>
Waits for tasks with the requested purpose and keeps unrelated work queued.
Sourcepub async fn flush_scope_purpose(
&self,
scope_id: &str,
purpose: RuntimeTaskPurpose,
) -> Result<()>
pub async fn flush_scope_purpose( &self, scope_id: &str, purpose: RuntimeTaskPurpose, ) -> Result<()>
Waits for tasks with the requested scope and purpose.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BackgroundMaintenanceQueue
impl !RefUnwindSafe for BackgroundMaintenanceQueue
impl !UnwindSafe for BackgroundMaintenanceQueue
impl Send for BackgroundMaintenanceQueue
impl Sync for BackgroundMaintenanceQueue
impl Unpin for BackgroundMaintenanceQueue
impl UnsafeUnpin for BackgroundMaintenanceQueue
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more