#[repr(u32)]pub enum SwitchReason {
Preempted = 1,
Yield = 2,
Blocked = 3,
Exited = 4,
Migrated = 5,
}Expand description
Why a running thread relinquished its execution context.
The value crosses the OS extension callback boundary, so its numeric layout is stable and may also be written directly to allocation-free trace records.
Variants§
Preempted = 1
A scheduler request selected a more urgent or otherwise eligible thread.
Yield = 2
The thread voluntarily yielded its current service position.
Blocked = 3
The thread committed a park or another blocking operation.
Exited = 4
The thread terminated and will never become runnable again.
Migrated = 5
CPU affinity or balancing moved the thread away from this CPU.
Trait Implementations§
Source§impl Clone for SwitchReason
impl Clone for SwitchReason
Source§fn clone(&self) -> SwitchReason
fn clone(&self) -> SwitchReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SwitchReason
Source§impl Debug for SwitchReason
impl Debug for SwitchReason
impl Eq for SwitchReason
Source§impl PartialEq for SwitchReason
impl PartialEq for SwitchReason
impl StructuralPartialEq for SwitchReason
Auto Trait Implementations§
impl Freeze for SwitchReason
impl RefUnwindSafe for SwitchReason
impl Send for SwitchReason
impl Sync for SwitchReason
impl Unpin for SwitchReason
impl UnsafeUnpin for SwitchReason
impl UnwindSafe for SwitchReason
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