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