Function lib_wc::executors::available_parallelism
source · pub fn available_parallelism() -> usize
Expand description
Checks the number of logical cores available to the system.
If the number of logical cores is not available, returns 1.
Examples
use lib_wc::executors::available_parallelism;
let n = available_parallelism();
assert!(n > 0);