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