pub struct Runtime<I> { /* private fields */ }Expand description
Owns process workers through cooperative shutdown and joining.
Enter on the original thread during single-threaded startup. Worker entries must observe shutdown and return; every started worker is joined before these methods return. A stalled worker can keep the caller waiting indefinitely. Heartbeat callbacks do not interrupt worker execution.
Implementations§
Source§impl<I> Runtime<I>
impl<I> Runtime<I>
Sourcepub fn run<'r, E, X>(
self,
storage: Vacant<'r, Receiver>,
entry: E,
) -> Result<(), Error<'r, Infallible, X>>
pub fn run<'r, E, X>( self, storage: Vacant<'r, Receiver>, entry: E, ) -> Result<(), Error<'r, Infallible, X>>
Runs workers whose application readiness is their executor-install edge.
Sourcepub fn run_watched<'r, N, E, X>(
self,
storage: Vacant<'r, Receiver>,
entry: E,
notify: N,
) -> Result<(), Error<'r, N::Error, X>>
pub fn run_watched<'r, N, E, X>( self, storage: Vacant<'r, Receiver>, entry: E, notify: N, ) -> Result<(), Error<'r, N::Error, X>>
Runs workers and supervises an explicit steady-state heartbeat.
Auto Trait Implementations§
impl<I> Forget for Runtime<I>
impl<I> Freeze for Runtime<I>where
Set<I>: Freeze,
impl<I> RefUnwindSafe for Runtime<I>where
Set<I>: RefUnwindSafe,
impl<I> Send for Runtime<I>where
Set<I>: Send,
impl<I> Sync for Runtime<I>where
Set<I>: Sync,
impl<I> Unpin for Runtime<I>where
Set<I>: Unpin,
impl<I> UnsafeUnpin for Runtime<I>where
Set<I>: UnsafeUnpin,
impl<I> UnwindSafe for Runtime<I>where
Set<I>: 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