fn cap_positive_thread_count( configured_threads: Option<usize>, available_threads: usize, ) -> Option<usize>