pub(crate) struct Reaper {
sender: Sender<Runnable>,
recv: Receiver<Runnable>,
zombies: AtomicUsize,
}Expand description
The zombie process reaper.
Fields§
§sender: Sender<Runnable>The channel for sending new runnables.
recv: Receiver<Runnable>The channel for receiving new runnables.
zombies: AtomicUsizeNumber of zombie processes.
Implementations§
Source§impl Reaper
impl Reaper
Sourcepub(crate) fn register(&'static self, child: Child) -> Result<ChildGuard>
pub(crate) fn register(&'static self, child: Child) -> Result<ChildGuard>
Register a child into this reaper.
Sourcepub(crate) async fn status(
&'static self,
child: &Mutex<ChildGuard>,
) -> Result<ExitStatus>
pub(crate) async fn status( &'static self, child: &Mutex<ChildGuard>, ) -> Result<ExitStatus>
Wait for a child to complete.
Sourcepub(crate) fn has_zombies(&'static self) -> bool
pub(crate) fn has_zombies(&'static self) -> bool
Do we have any registered zombie processes?
Auto Trait Implementations§
impl !Freeze for Reaper
impl RefUnwindSafe for Reaper
impl Send for Reaper
impl Sync for Reaper
impl !Unpin for Reaper
impl UnwindSafe for Reaper
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