gecko-dev/third_party/rust/num_cpus
2017-11-01 12:08:58 +00:00
..
src No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00
.appveyor.yml Bug 1277338 - Part 13: Update vendored crates for newer js crate; r=sfink 2017-09-05 09:26:22 -07:00
.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
Cargo.toml 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
LICENSE-APACHE
LICENSE-MIT
README.md No bug - Revendor rust dependencies 2017-11-01 12:08:58 +00:00

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();