#[repr(u8)]pub enum State {
New = 0,
Initial = 1,
Ready = 2,
Running = 3,
Terminated = 4,
Joined = 5,
WaitingInterruptible = 6,
WaitingNonInterruptible = 7,
}Expand description
Runtime state of a Thread.
Variants§
New = 0
Thread has been created but not initialized.
Initial = 1
Thread has been initialized and added to its parent process but has not been added to the scheduler.
Ready = 2
Thread is ready to run and owned by the scheduling algorithm.
Running = 3
Thread is currently running on a CPU core.
Terminated = 4
Thread has been successfully terminated and is waiting to be joined.
Joined = 5
Thread has been joined, removed from its parent process, and no longer participates in the system scheduler.
WaitingInterruptible = 6
Thread is interruptibly waiting in a WaitQueue.
WaitingNonInterruptible = 7
Thread is non-interruptibly waiting in a WaitQueue.
Implementations§
Source§impl State
impl State
pub fn is_waiting(&self) -> bool
Trait Implementations§
impl Copy for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Forget for State
impl Freeze for State
impl Move for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)