Skip to main content

yield_now

Function yield_now 

Source
pub fn yield_now(ctx: &ServiceContext)
Expand description

Give up the rest of this quantum.

Advisory only: the scheduler preempts at 10 ms regardless (CLAUDE.md 9.3), so this is politeness rather than a correctness tool. It cannot be relied on to let another service run, and a loop that needs it to make progress is a loop that should be blocking on something.