pub struct StdIdle { /* private fields */ }Available on crate feature
std only.Expand description
The executor’s idle on a std thread.
Implementations§
Source§impl StdIdle
impl StdIdle
Sourcepub fn new(clock: StdClock) -> Self
pub fn new(clock: StdClock) -> Self
An idle that parks through the CPU’s word wait when the wordwait feature is on and the
CPU has one; otherwise it yields to the bound (the declared fallback, see
StdIdle::parks_in_hardware).
Sourcepub fn with_word_wait(clock: StdClock, wait: WordWait) -> Self
Available on crate feature wordwait only.
pub fn with_word_wait(clock: StdClock, wait: WordWait) -> Self
wordwait only.An idle that parks through wait (a word wait probed by the caller).
Sourcepub fn parks_in_hardware(&self) -> bool
pub fn parks_in_hardware(&self) -> bool
Whether a park sleeps the core in hardware (false: it yields the thread in a loop).
Trait Implementations§
impl Copy for StdIdle
Source§impl Idle for StdIdle
impl Idle for StdIdle
Source§fn sleep_until(&mut self, at: MonoNs)
fn sleep_until(&mut self, at: MonoNs)
Sleep until the clock reads
at (an early return is allowed).Source§fn park_line<R: Fn(&CompletionLine) -> bool>(
&mut self,
line: &CompletionLine,
ready: R,
bound: DurNs,
) -> bool
fn park_line<R: Fn(&CompletionLine) -> bool>( &mut self, line: &CompletionLine, ready: R, bound: DurNs, ) -> bool
Park until a store to
line may have made ready(line) true, or bound passes; return
ready(line). An early false (a spurious wake) is allowed.Auto Trait Implementations§
impl Forget for StdIdle
impl Freeze for StdIdle
impl Move for StdIdle
impl RefUnwindSafe for StdIdle
impl Send for StdIdle
impl Sync for StdIdle
impl Unpin for StdIdle
impl UnsafeUnpin for StdIdle
impl UnwindSafe for StdIdle
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