pub struct AsyncStorageLoop<B: Backend, IO: Io, S> { /* private fields */ }Expand description
Background loop task state.
The background loop task is not allowed to exit, unless it was notified for shutdown.
On shutdown, attempts to empty the queue, and flush the receiver. When the last handle of the receiver is dropped, and the queue is empty, exit.
Implementations§
Source§impl<B, FS, S> AsyncStorageLoop<B, FS, S>
impl<B, FS, S> AsyncStorageLoop<B, FS, S>
Sourcepub async fn run(self)
pub async fn run(self)
Schedules durability jobs. This loop is not allowed to fail, or lose jobs.
A job is prepared by calling Scheduler::prepare(..). The job is spawned, and it returns a
JobResult, which is then returned to the scheduler by calling Scheduler::report(..).
When a request is received, it is immediately scheduled by calling Scheduler::register
with it.
The loop is only allowed to shutdown if the receiver is closed, and the scheduler is empty,
or if force_shutdown is called, in which case everything is dropped in place.
Auto Trait Implementations§
impl<B, IO, S> !RefUnwindSafe for AsyncStorageLoop<B, IO, S>
impl<B, IO, S> !UnwindSafe for AsyncStorageLoop<B, IO, S>
impl<B, IO, S> Freeze for AsyncStorageLoop<B, IO, S>
impl<B, IO, S> Send for AsyncStorageLoop<B, IO, S>where
S: Send,
impl<B, IO, S> Sync for AsyncStorageLoop<B, IO, S>
impl<B, IO, S> Unpin for AsyncStorageLoop<B, IO, S>
impl<B, IO, S> UnsafeUnpin for AsyncStorageLoop<B, IO, S>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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