Snap for 11406759 from e202d3616ef8dd39466a964a0dc16a01ad3f6295 to 24Q2-release Change-Id: I92995085b772960823d035a45a7f6bd2816932fb
Count the number of CPUs on the current machine.
Add to Cargo.toml:
[dependencies] num_cpus = "1.0"
In your main.rs or lib.rs:
main.rs
lib.rs
extern crate num_cpus; // count logical cores this process could try to use let num = num_cpus::get();