Skip to main content

yield_once

Function yield_once 

Source
pub async fn yield_once()
Expand description

Runtime-agnostic single-yield future. Returns Pending once then resolves to Ready(()) on the next poll, with wake_by_ref driving the re-poll. Works under any executor (pollster, tokio, smol, futures::executor).

Used by the default SyncWaiter::wait_async impl and by per-backend overrides for their fast-path yield-spin loops.