tree: c1ccfc2cfe10f1cda86aa0dc35acd1577bf157d9 [path history] [tgz]
  1. ci/
  2. examples/
  3. fixtures/
  4. src/
  5. .cargo-checksum.json
  6. Cargo.lock
  7. Cargo.toml
  8. CHANGELOG.md
  9. CONTRIBUTING.md
  10. LICENSE-APACHE
  11. LICENSE-MIT
  12. OWNERS
  13. 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();