Snap for 8261343 from 9f8910ae8692c12635e0e1f572c14e0357dd3f57 to tm-release

Change-Id: Ie4d378f35989bcb1dbab74726e58f604c3b8cb9b
tree: f15e382c8c37289b00f0119b13fa4cf1feda254c
  1. .github/
  2. ci/
  3. examples/
  4. fixtures/
  5. patches/
  6. src/
  7. .cargo_vcs_info.json
  8. .gitignore
  9. Android.bp
  10. Cargo.lock
  11. Cargo.toml
  12. Cargo.toml.orig
  13. cargo2android.json
  14. CHANGELOG.md
  15. CONTRIBUTING.md
  16. LICENSE-APACHE
  17. LICENSE-MIT
  18. METADATA
  19. MODULE_LICENSE_APACHE2
  20. OWNERS
  21. README.md
  22. TEST_MAPPING
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();