Bug: 171337558

Clone this repo:
  1. 07e8b1e Migrate 25 crates to monorepo. am: 93afadb3d7 by James Farrell · 4 months ago main master
  2. 93afadb Migrate 25 crates to monorepo. by James Farrell · 4 months ago
  3. c7f1701 Update Android.bp by running cargo_embargo am: caf052c525 by James Farrell · 4 months ago
  4. caf052c Update Android.bp by running cargo_embargo by James Farrell · 4 months ago
  5. 4a6372e Mark apex-available am: 62d1dbb981 by Elisei Zamakhov · 5 months ago android15-tests-dev

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