ThreadInner

Struct ThreadInner 

Source
pub struct ThreadInner {
Show 23 fields pub id: ThreadId, pub state: AtomicU8, pub priority: AtomicU8, pub stack: Option<Stack>, pub context: Option<*mut <DefaultArch as Arch>::SavedContext>, pub entry_point: Option<fn()>, pub join_result: Mutex<Option<()>>, pub time_slice: TimeSlice, pub name: Mutex<Option<String>>, pub cpu_affinity: AtomicU64, pub group_id: AtomicU64, pub critical: AtomicBool, pub preemptible: AtomicBool, pub tls_size: AtomicUsize, pub debug_info: AtomicBool, pub rt_priority: AtomicU8, pub nice_value: AtomicI8, pub inherit_signal_mask: AtomicBool, pub environment: Mutex<Option<BTreeMap<String, String>>>, pub max_cpu_time: AtomicU64, pub max_memory: AtomicUsize, pub max_files: AtomicU64, pub max_children: AtomicU64,
}
Expand description

Internal thread data shared between Thread and JoinHandle.

Fields§

§id: ThreadId

Unique thread identifier

§state: AtomicU8

Current execution state

§priority: AtomicU8

Thread priority (higher = more important)

§stack: Option<Stack>

Thread’s stack

§context: Option<*mut <DefaultArch as Arch>::SavedContext>

Architecture-specific saved context

§entry_point: Option<fn()>

Entry point function (simplified for now)

§join_result: Mutex<Option<()>>

Join result storage

§time_slice: TimeSlice

Time slice tracking for scheduling

§name: Mutex<Option<String>>

Thread name for debugging

§cpu_affinity: AtomicU64

CPU affinity mask

§group_id: AtomicU64

Thread group ID

§critical: AtomicBool

Whether this thread is critical

§preemptible: AtomicBool

Whether this thread can be preempted

§tls_size: AtomicUsize

Reserved TLS size

§debug_info: AtomicBool

Debug info enabled

§rt_priority: AtomicU8

Real-time priority

§nice_value: AtomicI8

Nice value

§inherit_signal_mask: AtomicBool

Inherit signal mask

§environment: Mutex<Option<BTreeMap<String, String>>>

Environment variables

§max_cpu_time: AtomicU64

Resource limits

§max_memory: AtomicUsize§max_files: AtomicU64§max_children: AtomicU64

Trait Implementations§

Source§

impl Drop for ThreadInner

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for ThreadInner

Source§

impl Sync for ThreadInner

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.