pub struct Thread<'mir, 'tcx> {
state: ThreadState,
thread_name: Option<Vec<u8>>,
stack: Vec<Frame<'mir, 'tcx, Provenance, FrameData<'tcx>>>,
join_status: ThreadJoinStatus,
pub(crate) panic_payload: Option<Scalar<Provenance>>,
pub(crate) last_error: Option<MPlaceTy<'tcx, Provenance>>,
}
Expand description
A thread.
Fields
state: ThreadState
thread_name: Option<Vec<u8>>
Name of the thread.
stack: Vec<Frame<'mir, 'tcx, Provenance, FrameData<'tcx>>>
The virtual call stack.
join_status: ThreadJoinStatus
The join status.
panic_payload: Option<Scalar<Provenance>>
The temporary used for storing the argument of
the call to miri_start_panic
(the panic payload) when unwinding.
This is pointer-sized, and matches the Payload
type in src/libpanic_unwind/miri.rs
.
last_error: Option<MPlaceTy<'tcx, Provenance>>
Last OS error location in memory. It is a 32-bit integer.
Implementations
sourceimpl<'mir, 'tcx> Thread<'mir, 'tcx>
impl<'mir, 'tcx> Thread<'mir, 'tcx>
sourcefn check_terminated(&mut self) -> bool
fn check_terminated(&mut self) -> bool
Check if the thread is done executing (no more stack frames). If yes,
change the state to terminated and return true
.
Trait Implementations
Auto Trait Implementations
impl<'mir, 'tcx> !RefUnwindSafe for Thread<'mir, 'tcx>
impl<'mir, 'tcx> !Send for Thread<'mir, 'tcx>
impl<'mir, 'tcx> !Sync for Thread<'mir, 'tcx>
impl<'mir, 'tcx> Unpin for Thread<'mir, 'tcx>where
'tcx: 'mir,
impl<'mir, 'tcx> !UnwindSafe for Thread<'mir, 'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
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: 184 bytes