Import num_cpus-1.13.0

Test: None
Change-Id: If454efdeb9d94ce92d67cdc7b7b6722662dd017e
24 files changed
tree: ece8f40720c179f3fdbd12617d6123e67f88cfda
  1. .appveyor.yml
  2. .cargo_vcs_info.json
  3. .gitignore
  4. .travis.yml
  5. CHANGELOG.md
  6. CONTRIBUTING.md
  7. Cargo.lock
  8. Cargo.toml
  9. Cargo.toml.orig
  10. LICENSE-APACHE
  11. LICENSE-MIT
  12. README.md
  13. ci/
  14. examples/
  15. fixtures/
  16. src/
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();