#[non_exhaustive]pub enum ProcessPriority {
Normal,
BelowNormal,
Idle,
Efficient,
}Expand description
Scheduling priority requested for the child. Normal (the default) means “inherit”: it
leaves the spawn exactly as it was before this option existed, so the child keeps the
parent’s priority class (Windows) or nice value (Unix). It does not reset a lowered parent
back to normal. The other values only lower priority, which needs no
privilege and never raises a value the child already inherits above a lower one.
Windows: BelowNormal adds BELOW_NORMAL_PRIORITY_CLASS and Idle adds
IDLE_PRIORITY_CLASS to the creation flags. Unix: the child’s nice value is raised to at
least 10 (BelowNormal) or 19 (Idle) between fork and exec.
Efficient is BelowNormal plus the platform’s energy-efficiency class, for background
work that should not wake the fast cores. Windows: BELOW_NORMAL_PRIORITY_CLASS plus
EcoQoS (PROCESS_POWER_THROTTLING_EXECUTION_SPEED through SetProcessInformation, set
while the child is still suspended; a Windows without EcoQoS ignores it, best effort).
macOS: nice 10 and the QOS_CLASS_UTILITY quality of service on the child’s initial
thread (set between fork and exec; advisory). Other Unix: nice 10.