Skip to main content

cpu_count

Function cpu_count 

Source
pub fn cpu_count() -> usize
Expand description

The number of CPUs this process may use (at least 1): the affinity mask, capped on Linux by a cgroup v2 CPU quota (cpu.max, as containers set it), like std::thread::available_parallelism but without its cgroup v1 code.