Enum miri::concurrency::thread::ThreadState
source · enum ThreadState<'tcx> {
Enabled,
Blocked {
reason: BlockReason,
timeout: Option<Timeout>,
callback: Box<dyn UnblockCallback<'tcx> + 'tcx>,
},
Terminated,
}
Expand description
The state of a thread.
Variants§
Enabled
The thread is enabled and can be executed.
Blocked
The thread is blocked on something.
Terminated
The thread has terminated its execution. We do not delete terminated threads (FIXME: why?).
Implementations§
source§impl<'tcx> ThreadState<'tcx>
impl<'tcx> ThreadState<'tcx>
fn is_enabled(&self) -> bool
fn is_terminated(&self) -> bool
fn is_blocked_on(&self, reason: BlockReason) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> Freeze for ThreadState<'tcx>
impl<'tcx> !RefUnwindSafe for ThreadState<'tcx>
impl<'tcx> !Send for ThreadState<'tcx>
impl<'tcx> !Sync for ThreadState<'tcx>
impl<'tcx> Unpin for ThreadState<'tcx>
impl<'tcx> !UnwindSafe for ThreadState<'tcx>
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes
Size for each variant:
Enabled
: 0 bytesBlocked
: 64 bytesTerminated
: 0 bytes