pub struct Yield;
Available on crate feature
std
only.Expand description
A strategy that yields the current time slice to the scheduler in favour of other threads or processes.
This is generally used as a strategy for minimising power consumption and priority inversion on targets that have a standard library available. Note that such targets have scheduler-integrated concurrency primitives available, and you should generally use these instead, except in rare circumstances.
Trait Implementations
sourceimpl RelaxStrategy for Yield
impl RelaxStrategy for Yield
Auto Trait Implementations
impl RefUnwindSafe for Yield
impl Send for Yield
impl Sync for Yield
impl Unpin for Yield
impl UnwindSafe for Yield
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more