Skip to main content

set_num_threads

Function set_num_threads 

Source
pub fn set_num_threads(num_threads: usize) -> Result<()>
Expand description

Configure the global thread pool for parallel search.

Must be called before any search operation. Can only be called once per process — subsequent calls return an error.

If not called, rayon defaults to the number of available CPUs (or the RAYON_NUM_THREADS environment variable).