pub struct RootMaintenanceExecutor { /* private fields */ }Expand description
A root may submit maintenance without keeping its owning executor alive. The weak link avoids a cycle through the executor’s actor context.
Implementations§
Source§impl RootMaintenanceExecutor
impl RootMaintenanceExecutor
Sourcepub fn submit_maintenance(
&self,
request_id: &str,
lane: Lane,
cancellation: JobCancellation,
job: Box<dyn FnOnce() -> Response + Send + 'static>,
) -> bool
pub fn submit_maintenance( &self, request_id: &str, lane: Lane, cancellation: JobCancellation, job: Box<dyn FnOnce() -> Response + Send + 'static>, ) -> bool
Admits job as this root’s maintenance and runs it at once on the
calling thread, with the root’s cancellation installed as the current
job’s: cancellation gains the root and its bind lifecycle, so a root
unbinding cancels whatever the job starts at its checkpoints. The
executor refuses the job, and drops it unrun, under the same rules as
a maintenance job on a worker: the root is unbound, its folder is
gone, its actor is not registered or failed, or the token is already
cancelled. false when the executor has shut down; the caller must
not run the work some other way, which would reactivate a retired
root.
The data layer’s background work is the only caller, and its job only
hands the work to a pool of its own threads. The job does not wait
for a worker: a call-graph read waits on a worker for the build or
refresh it asked for, and the scheduler keeps its last
interactive_reserve general workers from maintenance. When the
handoff was queued as maintenance, two such reads on a four-worker
pool (one on a two-worker pool) held exactly the workers the handoff
waited for, so the build started only after each read had given up.
lane only labels the admission in the log.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RootMaintenanceExecutor
impl !UnwindSafe for RootMaintenanceExecutor
impl Forget for RootMaintenanceExecutor
impl Freeze for RootMaintenanceExecutor
impl Move for RootMaintenanceExecutor
impl Send for RootMaintenanceExecutor
impl Sync for RootMaintenanceExecutor
impl Unpin for RootMaintenanceExecutor
impl UnsafeUnpin for RootMaintenanceExecutor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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