pub fn effective_threads(policy: &RuntimePolicy, detected_cores: usize) -> usizeExpand description
Resolve the effective thread cap for a policy given a detected core count.
An explicit max_threads > 0 wins (clamped to the detected cores so we
never over-subscribe). Otherwise the thermal mode derives the cap:
Cool ≈ quarter of cores, Balanced ≈ half, MaxPerf = all. The result
is always in 1..=cores. Pure function — deterministic given its inputs.