many_cpus 2.4.0

Efficiently schedule work and inspect the hardware environment on many-processor systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! We inspect every processor in the default set and write a
//! human-readable description of it to the terminal.
//!
//! This obeys the operating system enforced processor selection and resource quota constraints
//! assigned to the current process (which is the default behavior).

use many_cpus::SystemHardware;

fn main() {
    let processors = SystemHardware::current().processors();

    for processor in processors {
        println!("{processor:?}");
    }
}