Skip to main content

yield_now

Function yield_now 

Source
pub async fn yield_now()
Expand description

Hand control back to the executor once, so another task can make progress.

Used by yielding try_lock loops: a waiter releases the CPU instead of spinning while the holder finishes.