tree: 4ca5b1e24994bc3ac544c538d33aecd8192391b7 [path history] [tgz]
  1. .appveyor.yml
  2. .cargo-checksum.json
  3. .cargo-ok
  4. .travis.yml
  5. CHANGELOG.md
  6. CONTRIBUTING.md
  7. Cargo.toml
  8. LICENSE-APACHE
  9. LICENSE-MIT
  10. README.md
  11. src/
vendor/num_cpus-1.7.0/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();