pub struct ScheduleDecision { /* private fields */ }Expand description
Result of one scheduler safe-point decision.
Implementations§
Source§impl ScheduleDecision
impl ScheduleDecision
Sourcepub const fn previous(&self) -> Option<ThreadId>
pub const fn previous(&self) -> Option<ThreadId>
Returns the thread that stopped running, if any.
Sourcepub const fn switch_reason(&self) -> SwitchReason
pub const fn switch_reason(&self) -> SwitchReason
Returns why the previous thread relinquished the CPU.
Sourcepub const fn timestamp_ns(&self) -> u64
pub const fn timestamp_ns(&self) -> u64
Returns the runqueue timestamp that committed this decision.
Sourcepub fn requires_context_switch(&self) -> bool
pub fn requires_context_switch(&self) -> bool
Returns whether the architecture execution context must change.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScheduleDecision
impl RefUnwindSafe for ScheduleDecision
impl Send for ScheduleDecision
impl Sync for ScheduleDecision
impl Unpin for ScheduleDecision
impl UnsafeUnpin for ScheduleDecision
impl UnwindSafe for ScheduleDecision
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