pub struct Process { /* 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 Process
impl Process
pub fn pinned(cpus: impl IntoIterator<Item = Cpu>) -> Result<Self, Error>
pub fn count(&self) -> NonZeroUsize
Sourcepub fn run<'r, I, R, E, X>(
self,
storage: Vacant<'r, Receiver>,
items: R,
entry: E,
) -> Result<(), Error<'r, Infallible, X>>
pub fn run<'r, I, R, E, X>( self, storage: Vacant<'r, Receiver>, items: R, entry: E, ) -> Result<(), Error<'r, Infallible, X>>
Runs workers whose application readiness is their executor-install edge.
Sourcepub fn run_watched<'r, I, R, N, E, X>(
self,
storage: Vacant<'r, Receiver>,
items: R,
entry: E,
notify: N,
) -> Result<(), Error<'r, N::Error, X>>
pub fn run_watched<'r, I, R, N, E, X>( self, storage: Vacant<'r, Receiver>, items: R, entry: E, notify: N, ) -> Result<(), Error<'r, N::Error, X>>
Runs workers and supervises an explicit steady-state heartbeat.
Sourcepub fn watch_gated<'r, I, R, N, E, X>(
self,
storage: Vacant<'r, Receiver>,
items: R,
entry: E,
notify: N,
) -> Result<(), Error<'r, N::Error, X>>
pub fn watch_gated<'r, I, R, N, E, X>( self, storage: Vacant<'r, Receiver>, items: R, entry: E, notify: N, ) -> Result<(), Error<'r, N::Error, X>>
Runs gated workers and supervises an explicit steady-state heartbeat.
Sourcepub fn fork_gated<'r, O, T, I, F, R, N, E, X>(
self,
storage: Vacant<'r, Receiver>,
owner: O,
items: R,
issue: impl Fn(&O, T) -> Result<I, F>,
finish: impl FnOnce(O, T) -> I,
entry: E,
notify: N,
) -> Result<(), Error<'r, N::Error, X, F>>
pub fn fork_gated<'r, O, T, I, F, R, N, E, X>( self, storage: Vacant<'r, Receiver>, owner: O, items: R, issue: impl Fn(&O, T) -> Result<I, F>, finish: impl FnOnce(O, T) -> I, entry: E, notify: N, ) -> Result<(), Error<'r, N::Error, X, F>>
Replicates prior inputs and moves the original owner into the final CPU.
Auto Trait Implementations§
impl Forget for Process
impl Freeze for Process
impl Move for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnsafeUnpin for Process
impl UnwindSafe for Process
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