pub struct PollWaitHandle { /* private fields */ }Expand description
Cloneable, Send handle onto the kernel’s poll notifier so a caller can wait
for “some poll-visible state changed” OFF the thread that owns the kernel
(deferred readiness servicing), then re-check readiness with a zero-timeout
poll on the owning thread. Take snapshot() BEFORE the readiness check it
guards so a change landing between the check and the wait wakes immediately
instead of being lost.
Implementations§
Source§impl PollWaitHandle
impl PollWaitHandle
Sourcepub fn wait_for_change(&self, observed: u64, timeout: Option<Duration>) -> bool
pub fn wait_for_change(&self, observed: u64, timeout: Option<Duration>) -> bool
Block until the generation moves past observed or timeout elapses
(None = wait forever). Returns true when a change was observed.
Sourcepub async fn wait_for_change_async(&self, observed: u64) -> bool
pub async fn wait_for_change_async(&self, observed: u64) -> bool
Yield until the generation moves past observed without occupying an
OS thread. The returned future is runtime-neutral; the sidecar may await
it on its one process-owned executor while browser-free kernel users may
use any compatible executor.
Trait Implementations§
Source§impl Clone for PollWaitHandle
impl Clone for PollWaitHandle
Source§fn clone(&self) -> PollWaitHandle
fn clone(&self) -> PollWaitHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PollWaitHandle
impl RefUnwindSafe for PollWaitHandle
impl Send for PollWaitHandle
impl Sync for PollWaitHandle
impl Unpin for PollWaitHandle
impl UnsafeUnpin for PollWaitHandle
impl UnwindSafe for PollWaitHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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