Mark apex-available am: 62d1dbb981

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

Change-Id: Iafce75e01af0b670aedb1e4ec734b6cbd2aba792
Signed-off-by: Automerger Merge Worker <[email protected]>
tree: a1a1030cbdef52717986809e5a30a57bac83ee4d
  1. .github/
  2. ci/
  3. examples/
  4. fixtures/
  5. patches/
  6. src/
  7. .cargo_vcs_info.json
  8. .gitignore
  9. Android.bp
  10. Cargo.toml
  11. Cargo.toml.orig
  12. cargo_embargo.json
  13. CHANGELOG.md
  14. CONTRIBUTING.md
  15. LICENSE-APACHE
  16. LICENSE-MIT
  17. METADATA
  18. MODULE_LICENSE_APACHE2
  19. OWNERS
  20. README.md
  21. TEST_MAPPING
README.md

num_cpus

crates.io CI 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();