pub fn yield_local() -> Option<Yield>
Expand description
Cooperatively yields execution to local Rayon work.
If the current thread is part of a rayon thread pool, this looks for a single unit of pending work in this thread’s queue, then executes it. Completion of that work might include nested work or further work stealing.
This is similar to yield_now()
, but does not steal from other threads.
Returns Some(Yield::Executed)
if anything was executed, Some(Yield::Idle)
if
nothing was available, or None
if this thread is not part of any pool at all.