pub struct ChildWatch { /* private fields */ }Expand description
What: The watcher of one child process. Why: One watch serves every wait on the same child: a long-lived reader marks one wait per request, a one-shot command marks one wait. Dropping the watch ends its thread.
In TS you’d write (pseudocode):
class ChildWatch implements Disposable { begin(); end(); get expired(): boolean }Implementations§
Source§impl ChildWatch
impl ChildWatch
Sourcepub fn start(waiting_for: &str, pid: u32, terms: WatchTerms) -> Self
pub fn start(waiting_for: &str, pid: u32, terms: WatchTerms) -> Self
Start watching pid:
waits marked with begin and end are announced as waiting for waiting_for and bounded by the terms’ limit.
A watch whose thread cannot start watches nothing, and the waits it marks run unannounced and unbounded.
Trait Implementations§
Source§impl Drop for ChildWatch
Stops the watcher thread and waits for it.
impl Drop for ChildWatch
Stops the watcher thread and waits for it.
Auto Trait Implementations§
impl !RefUnwindSafe for ChildWatch
impl !UnwindSafe for ChildWatch
impl Freeze for ChildWatch
impl Send for ChildWatch
impl Sync for ChildWatch
impl Unpin for ChildWatch
impl UnsafeUnpin for ChildWatch
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more