Snap for 9722771 from f2b8688cdd8e7e4ab5b099ce3b8ae98cf0915f0e to udc-d1-release Change-Id: I8b447cdf659ab8dd6c0332d8c3e231cdea96caa1
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();