pub struct Runtime { /* private fields */ }Expand description
Owns workers through cooperative shutdown and joining. Enter on the original thread during single-threaded startup; entries must observe shutdown and return. Every started worker is joined. Heartbeats cannot interrupt stalled workers or bound the wait.
Implementations§
Source§impl Runtime
impl Runtime
pub fn pinned(cpus: impl IntoIterator<Item = Cpu>) -> Result<Self, Error>
pub fn count(&self) -> NonZeroUsize
Sourcepub fn run<R, E, X>(
self,
items: R,
entry: E,
) -> Result<(), Error<Infallible, X>>
pub fn run<R, E, X>( self, items: R, entry: E, ) -> Result<(), Error<Infallible, X>>
Runs workers whose application readiness is their executor-install edge.
Sourcepub fn run_watched<R, N, E, X>(
self,
items: R,
entry: E,
notify: N,
) -> Result<(), Error<N::Error, X>>
pub fn run_watched<R, N, E, X>( self, items: R, entry: E, notify: N, ) -> Result<(), Error<N::Error, X>>
Runs workers and supervises an explicit steady-state heartbeat.
Sourcepub fn watch_gated<R, N, E, X>(
self,
items: R,
entry: E,
notify: N,
) -> Result<(), Error<N::Error, X>>
pub fn watch_gated<R, N, E, X>( self, items: R, entry: E, notify: N, ) -> Result<(), Error<N::Error, X>>
Runs gated workers and supervises an explicit steady-state heartbeat.
Auto Trait Implementations§
impl Forget for Runtime
impl Freeze for Runtime
impl Move for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtimewhere
RawVecInner: Send,
impl Sync for Runtimewhere
RawVecInner: Sync,
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl UnwindSafe for Runtimewhere
RawVecInner: UnwindSafe,
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