Skip to main content

compute_max_workers

Function compute_max_workers 

Source
fn compute_max_workers(
    devices: &MultiDevice,
    default_worker_count: Option<usize>,
    max_workers_cfg: usize,
) -> usize
Expand description

Determine an ideal max worker count based on true capacity. The true value is rarely attainable in a thread-worker model so the result is clamped by both the rlimit-derived budget and the static WORKER_LIMIT range.