Snap for 8512216 from 9f8910ae8692c12635e0e1f572c14e0357dd3f57 to tm-frc-permission-release Change-Id: I259ebb5e585a7c89fcd3245ecdffd3e61df4abd0
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();