Snap for 8261343 from 9f8910ae8692c12635e0e1f572c14e0357dd3f57 to tm-release Change-Id: Ie4d378f35989bcb1dbab74726e58f604c3b8cb9b
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();