Struct miri::concurrency::thread::Thread
source · 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: ThreadJoinStatusThe 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§
source§impl<'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.
sourcefn thread_name(&self) -> &[u8] ⓘ
fn thread_name(&self) -> &[u8] ⓘ
Get the name of the current thread, or <unnamed> if it was not set.
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§
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