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.