Add metadata files am: 00958f65ba am: 8b26c738c2

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/num_cpus/+/1472195

Change-Id: I089066aa6315ec1df68877a0c628192322d0f9a7
tree: 2688bf9a6c8feb1ae92ceae63e88a9f003c76f97
  1. ci/
  2. examples/
  3. fixtures/
  4. src/
  5. .appveyor.yml
  6. .cargo_vcs_info.json
  7. .gitignore
  8. .travis.yml
  9. Cargo.lock
  10. Cargo.toml
  11. Cargo.toml.orig
  12. CHANGELOG.md
  13. CONTRIBUTING.md
  14. LICENSE-APACHE
  15. LICENSE-MIT
  16. METADATA
  17. MODULE_LICENSE_APACHE2
  18. OWNERS
  19. README.md
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();