gecko-dev/third_party/rust/num_cpus
Servo VCS Sync 2f622984ed No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
..
src No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
.appveyor.yml
.cargo-checksum.json No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
.travis.yml No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
CHANGELOG.md No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
CONTRIBUTING.md No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
Cargo.toml No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
LICENSE-APACHE
LICENSE-MIT
README.md No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00: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();