pub enum SchedulerOutcome {
Quiescent,
ParkingDeferred,
OwnerWorkPending,
Decision(ScheduleDecision),
}Expand description
Result of one bounded scheduler safe point.
This type deliberately keeps lifecycle deferral and bounded owner work
separate from a scheduling decision. Callers must not infer either state
from a boolean need_resched value or an absent decision.
Variants§
Quiescent
No context switch or owner-only work remains from this pass.
ParkingDeferred
The current thread owns an in-flight park token and must finish it.
OwnerWorkPending
One bounded owner batch completed, with more work retained.
Decision(ScheduleDecision)
The scheduler selected a next thread.
Implementations§
Source§impl SchedulerOutcome
impl SchedulerOutcome
Sourcepub const fn decision(&self) -> Option<&ScheduleDecision>
pub const fn decision(&self) -> Option<&ScheduleDecision>
Returns the scheduler decision, if this pass selected a thread.
Sourcepub const fn parking_deferred(&self) -> bool
pub const fn parking_deferred(&self) -> bool
Returns whether the caller must finish a pending park handshake before scheduler task-work callbacks may execute.
Sourcepub const fn owner_work_pending(&self) -> bool
pub const fn owner_work_pending(&self) -> bool
Returns whether more owner-only work remains for a later bounded safe point.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchedulerOutcome
impl RefUnwindSafe for SchedulerOutcome
impl Send for SchedulerOutcome
impl Sync for SchedulerOutcome
impl Unpin for SchedulerOutcome
impl UnsafeUnpin for SchedulerOutcome
impl UnwindSafe for SchedulerOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more