oden/third-party/vendor/num_cpus
2024-03-08 11:03:01 -08:00
..
ci/cgroups Vendor things 2024-03-08 11:03:01 -08:00
examples Vendor things 2024-03-08 11:03:01 -08:00
fixtures Vendor things 2024-03-08 11:03:01 -08:00
src Vendor things 2024-03-08 11:03:01 -08:00
.cargo-checksum.json Vendor things 2024-03-08 11:03:01 -08:00
Cargo.lock Vendor things 2024-03-08 11:03:01 -08:00
Cargo.toml Vendor things 2024-03-08 11:03:01 -08:00
CHANGELOG.md Vendor things 2024-03-08 11:03:01 -08:00
CONTRIBUTING.md Vendor things 2024-03-08 11:03:01 -08:00
LICENSE-APACHE Vendor things 2024-03-08 11:03:01 -08:00
LICENSE-MIT Vendor things 2024-03-08 11:03:01 -08:00
README.md Vendor things 2024-03-08 11:03:01 -08:00

num_cpus

crates.io CI Status

Count the number of CPUs on the current machine.

Usage

Add to Cargo.toml:

[dependencies]
num_cpus = "1.0"

In your main.rs or lib.rs:

extern crate num_cpus;

// count logical cores this process could try to use
let num = num_cpus::get();