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