pub fn set_threads(threads: usize) -> Result<(), ThreadPoolBuildError>
Expand description
Sets the number of threads to use for parallelization.
This is a thin wrapper around rayon::ThreadPoolBuilder
to save users from having to
import rayon
to control parallelism. The meaning of the threads
parameter here derives
from rayon::ThreadPoolBuilder::num_threads
, see it’s documentation for details.