You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1026: Add `yield_now` and `yield_local` r=cuviper a=cuviper
* `yield_now` looks for work anywhere in the thread pool and executes it.
* `yield_local` only looks in the thread-local deque (including broadcasts).
In either case, they return:
* `Some(Yield::Executed)` if work was found and executed.
* `Some(Yield::Idle)` if no work was found in their pool/thread.
* `None` if the current thread is not part of a thread pool.
These do not call `std::thread::yield_now()`, but the docs suggest polling loops might want to add that as a fallback.
Co-authored-by: Josh Stone <cuviper@gmail.com>
0 commit comments