Skip to main content

num_threads

Function num_threads 

Source
pub fn num_threads() -> usize
Expand description

Worker count of the active backend.

Call this instead of rayon::current_num_threads anywhere a task decomposition is being sized: rayon::current_num_threads builds the global rayon pool as a side effect, so asking it under the spin backend spawns a second set of threads that would never run anything.