pub struct SmolYield;Available on crate feature
async-smol only.Expand description
An implementation of SleepProvider using Smol’s yield.
This strategy avoids timer-based delays by yielding to the scheduler immediately, which can improve responsiveness in low-concurrency scenarios.
However, it comes at the cost of more frequent rescheduling, which can
result in tighter polling loops and increased CPU usage under load. In
highly concurrent cases, a timer-based sleep (e.g., SmolSleep) is often
more efficient due to reduced scheduler churn.
Trait Implementations§
Source§impl SleepProvider for SmolYield
Available on crate features async-tokio or async-smol only.
impl SleepProvider for SmolYield
Available on crate features
async-tokio or async-smol only.Auto Trait Implementations§
impl Freeze for SmolYield
impl RefUnwindSafe for SmolYield
impl Send for SmolYield
impl Sync for SmolYield
impl Unpin for SmolYield
impl UnwindSafe for SmolYield
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