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>

source

pub fn active_thread_stack( &self ) -> &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>]

Borrow the stack of the active thread.

source

pub fn all_stacks( &self ) -> impl Iterator<Item = (ThreadId, &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>])>

source

pub fn get_active_thread_id(&self) -> ThreadId

Get the id of the currently active thread.

source

pub fn get_total_thread_count(&self) -> usize

Get the total number of threads that were ever spawn by this program.

source

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.)

source

pub fn active_thread_mut(&mut self) -> &mut Thread<'mir, 'tcx>

Get a mutable borrow of the currently active thread.

source

pub fn active_thread_ref(&self) -> &Thread<'mir, 'tcx>

Get a shared borrow of the currently active thread.

source

pub fn set_thread_name(&mut self, thread: ThreadId, new_thread_name: Vec<u8>)

Set the name of the given thread.

source

pub fn get_thread_name(&self, thread: ThreadId) -> Option<&[u8]>

Get the name of the given thread.

source

pub fn get_thread_display_name(&self, thread: ThreadId) -> String

Trait Implementations§

source§

impl<'mir, 'tcx> Debug for ThreadManager<'mir, 'tcx>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'mir, 'tcx> Default for ThreadManager<'mir, 'tcx>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl VisitProvenance for ThreadManager<'_, '_>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V