pub enum RunState {
Running,
Waiter(WaiterRef),
Event(Arc<InterruptibleEvent>),
Frozen(Waiter),
TracingStopped,
}Expand description
Whether, and how, this task is blocked. This enum can be extended with new variants to optimize different kinds of waiting.
Variants§
Running
This task is not blocked.
The task might be running in userspace or kernel.
Waiter(WaiterRef)
This thread is blocked in a Waiter.
Event(Arc<InterruptibleEvent>)
This thread is blocked in an InterruptibleEvent.
Frozen(Waiter)
This thread is frozen by a Waiter.
When waiting on the Waiter, it should have a loop to prevent any signals except
notification.
TracingStopped
This thread is stopped by a tracer (or stopped by job control).
It is not interruptible except by the tracer or SIGCONT, and can be aborted by SIGKILL.
Implementations§
Source§impl RunState
impl RunState
Sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
Whether this task is blocked.
If the task is blocked, you can break the task out of the wait using the wake function.
Sourcepub fn ignores_signals(&self) -> bool
pub fn ignores_signals(&self) -> bool
Whether this task ignores signals other than SIGKILL while blocked in this state.
Sourcepub fn state_code(&self) -> TaskStateCode
pub fn state_code(&self) -> TaskStateCode
The TaskStateCode corresponding to the RunState.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RunState
impl !UnwindSafe for RunState
impl Freeze for RunState
impl Send for RunState
impl Sync for RunState
impl Unpin for RunState
impl UnsafeUnpin for RunState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more