Skip to main content

yield_now

Function yield_now 

Source
pub fn yield_now() -> impl Future<Output = ()>
Expand description

Gives way once: the task is woken and set aside, and whatever else is ready runs before it resumes.

Under a [Seeded] executor this is where two tasks can change places, so a fake that stands in for slow work yields where the real work would wait.