1 2 3 4 5 6 7
#[inline] pub fn get_thread_count() -> usize { match std::thread::available_parallelism() { Ok(count) => count.get(), Err(_) => 1, } }