Bug: 171337558

Clone this repo:

Branches

  1. 02cb8af TEST_MAPPING: test dependers of this crate by Jeff Vander Stoep · 3 weeks ago master
  2. 4993e63 Add Android.bp by Joel Galenson · 5 weeks ago
  3. 00958f6 Add metadata files by Joel Galenson · 5 weeks ago
  4. 006226b Import num_cpus-1.13.0 by Joel Galenson · 5 weeks ago
  5. ab023d5 Initial empty repository by Inna Palant · 5 weeks ago

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();