1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//! Fallback if no OS is matched. use std::num::NonZeroUsize; #[inline] pub(crate) fn thread_amount() -> Option<NonZeroUsize> { None } #[inline] pub(crate) fn is_single_threaded() -> bool { match thread_amount() { Some(amount) => amount.get() == 1, None => false, } }