cheep-crator-2/vendor/num_cpus
Nixon Enraght-Moony 842725426c Vendor everything 2022-07-19 12:14:16 +01:00
..
ci/cgroups Vendor everything 2022-07-19 12:14:16 +01:00
examples Vendor everything 2022-07-19 12:14:16 +01:00
fixtures/cgroups Vendor everything 2022-07-19 12:14:16 +01:00
src Vendor everything 2022-07-19 12:14:16 +01:00
.cargo-checksum.json Vendor everything 2022-07-19 12:14:16 +01:00
CHANGELOG.md Vendor everything 2022-07-19 12:14:16 +01:00
CONTRIBUTING.md Vendor everything 2022-07-19 12:14:16 +01:00
Cargo.lock Vendor everything 2022-07-19 12:14:16 +01:00
Cargo.toml Vendor everything 2022-07-19 12:14:16 +01:00
LICENSE-APACHE Vendor everything 2022-07-19 12:14:16 +01:00
LICENSE-MIT Vendor everything 2022-07-19 12:14:16 +01:00
README.md Vendor everything 2022-07-19 12:14:16 +01:00

README.md

num_cpus

crates.io Travis CI Status AppVeyor 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();