pub struct PriorityCaps {
pub effective_rank: [u8; 7],
}Expand description
What each ThreadPriority level will effectively deliver, as opaque
ranks. Returned by priority_capabilities.
effective_rank[level as usize] grows with effective strength; the
absolute numbers carry no meaning beyond ordering. Two levels with equal
rank currently resolve to the same scheduler behavior.
The snapshot is point-in-time: it reflects this process’s rlimits and the reachability of the system’s priority broker (rtkit) at the moment of the call. rtkit in particular can silently withdraw cooperation later (its watchdog demotes a process that starves the canary), so treat the result as a planning hint, not a contract.
Fields§
§effective_rank: [u8; 7]Effective strength rank per level, indexed by ThreadPriority as usize
(Background = 0 … TimeCritical = 6).
Implementations§
Source§impl PriorityCaps
impl PriorityCaps
Sourcepub fn rank(&self, priority: ThreadPriority) -> u8
pub fn rank(&self, priority: ThreadPriority) -> u8
The effective strength rank of priority (higher = stronger).
Sourcepub fn distinct(&self, a: ThreadPriority, b: ThreadPriority) -> bool
pub fn distinct(&self, a: ThreadPriority, b: ThreadPriority) -> bool
true when a and b currently resolve to different scheduler
behavior. distinct(Highest, Normal) == false is the classic
unprivileged-Linux-without-rtkit signal: your render thread will NOT
outrank your workers, plan accordingly.
Sourcepub fn distinct_levels(&self) -> u8
pub fn distinct_levels(&self) -> u8
Number of effectively distinct levels (7 = the full ladder works).
Trait Implementations§
Source§impl Clone for PriorityCaps
impl Clone for PriorityCaps
Source§fn clone(&self) -> PriorityCaps
fn clone(&self) -> PriorityCaps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PriorityCaps
Source§impl Debug for PriorityCaps
impl Debug for PriorityCaps
impl Eq for PriorityCaps
Source§impl PartialEq for PriorityCaps
impl PartialEq for PriorityCaps
Source§fn eq(&self, other: &PriorityCaps) -> bool
fn eq(&self, other: &PriorityCaps) -> bool
self and other values to be equal, and is used by ==.