#[repr(u8)]pub enum ThreadState {
New = 0,
Running = 2,
Parking = 3,
Blocked = 4,
Waking = 5,
Exited = 6,
}Expand description
Observable lifecycle state of a thread.
Variants§
New = 0
Allocated but not admitted to a run queue.
Running = 2
Linux-style TASK_RUNNING, whether queued or executing on a CPU.
Parking = 3
Publishing a block operation while racing with wake-up.
Blocked = 4
Asleep on a wait object.
Waking = 5
A wake operation won the block/wake race.
Exited = 6
Execution has terminated and resources await reaping.
Trait Implementations§
Source§impl Clone for ThreadState
impl Clone for ThreadState
Source§fn clone(&self) -> ThreadState
fn clone(&self) -> ThreadState
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 ThreadState
Source§impl Debug for ThreadState
impl Debug for ThreadState
impl Eq for ThreadState
Source§impl PartialEq for ThreadState
impl PartialEq for ThreadState
impl StructuralPartialEq for ThreadState
Auto Trait Implementations§
impl Freeze for ThreadState
impl RefUnwindSafe for ThreadState
impl Send for ThreadState
impl Sync for ThreadState
impl Unpin for ThreadState
impl UnsafeUnpin for ThreadState
impl UnwindSafe for ThreadState
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