Struct miri::ThreadManager
source · pub struct ThreadManager<'mir, 'tcx> { /* private fields */ }
Expand description
A set of threads.
Implementations§
source§impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx>
sourcepub fn active_thread_stack(
&self
) -> &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>]
pub fn active_thread_stack( &self ) -> &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>]
Borrow the stack of the active thread.
pub fn all_stacks( &self ) -> impl Iterator<Item = (ThreadId, &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>])>
sourcepub fn get_active_thread_id(&self) -> ThreadId
pub fn get_active_thread_id(&self) -> ThreadId
Get the id of the currently active thread.
sourcepub fn get_total_thread_count(&self) -> usize
pub fn get_total_thread_count(&self) -> usize
Get the total number of threads that were ever spawn by this program.
sourcepub fn get_live_thread_count(&self) -> usize
pub fn get_live_thread_count(&self) -> usize
Get the total of threads that are currently live, i.e., not yet terminated. (They might be blocked.)
sourcepub fn active_thread_mut(&mut self) -> &mut Thread<'mir, 'tcx>
pub fn active_thread_mut(&mut self) -> &mut Thread<'mir, 'tcx>
Get a mutable borrow of the currently active thread.
sourcepub fn active_thread_ref(&self) -> &Thread<'mir, 'tcx>
pub fn active_thread_ref(&self) -> &Thread<'mir, 'tcx>
Get a shared borrow of the currently active thread.
sourcepub fn set_thread_name(&mut self, thread: ThreadId, new_thread_name: Vec<u8>)
pub fn set_thread_name(&mut self, thread: ThreadId, new_thread_name: Vec<u8>)
Set the name of the given thread.
sourcepub fn get_thread_name(&self, thread: ThreadId) -> Option<&[u8]>
pub fn get_thread_name(&self, thread: ThreadId) -> Option<&[u8]>
Get the name of the given thread.
pub fn get_thread_display_name(&self, thread: ThreadId) -> String
Trait Implementations§
source§impl<'mir, 'tcx> Debug for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> Debug for ThreadManager<'mir, 'tcx>
source§impl<'mir, 'tcx> Default for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> Default for ThreadManager<'mir, 'tcx>
source§impl VisitProvenance for ThreadManager<'_, '_>
impl VisitProvenance for ThreadManager<'_, '_>
fn visit_provenance(&self, visit: &mut VisitWith<'_>)
Auto Trait Implementations§
impl<'mir, 'tcx> !Freeze for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> !RefUnwindSafe for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> !Send for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> !Sync for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> Unpin for ThreadManager<'mir, 'tcx>
impl<'mir, 'tcx> !UnwindSafe for ThreadManager<'mir, '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