pub struct ExitWatch(/* private fields */);Expand description
Sleeps until a child exits, its Bell rings or a deadline passes.
Implementations§
Source§impl ExitWatch
impl ExitWatch
Sourcepub fn new(child: &Child) -> (Self, Bell)
pub fn new(child: &Child) -> (Self, Bell)
Watches child, and returns the bell that wakes Self::wait. child must
not have been waited for yet: once reaped, its process id can name another
process.
Sourcepub fn wait(&self, deadline: Option<Duration>)
pub fn wait(&self, deadline: Option<Duration>)
Sleeps until the child exits, the bell rings or deadline (from now) passes;
None waits without a deadline. It never reaps the child.
Sourcepub fn watches_the_process(&self) -> bool
pub fn watches_the_process(&self) -> bool
Whether the system lets this watch sleep until the child exits, rather than returning every 100 ms.
Auto Trait Implementations§
impl Forget for ExitWatch
impl Freeze for ExitWatchwhere
I32NotAllOnes: Freeze,
impl Move for ExitWatch
impl RefUnwindSafe for ExitWatchwhere
I32NotAllOnes: RefUnwindSafe,
impl Send for ExitWatchwhere
I32NotAllOnes: Send,
impl Sync for ExitWatchwhere
I32NotAllOnes: Sync,
impl Unpin for ExitWatchwhere
I32NotAllOnes: Unpin,
impl UnsafeUnpin for ExitWatchwhere
I32NotAllOnes: UnsafeUnpin,
impl UnwindSafe for ExitWatchwhere
I32NotAllOnes: 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