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