tree: 53289378a1fb6aadecb177f298f4908699d0ee58 [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();