tree: 95d8abc2c926d6ca1f7ac184ae17bb023d8a7b64 [path history] [tgz]
  1. .cargo-checksum.json
  2. CHANGELOG.md
  3. CONTRIBUTING.md
  4. Cargo.toml
  5. LICENSE-APACHE
  6. LICENSE-MIT
  7. README.md
  8. src/
rustc_deps/vendor/num_cpus/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();