Skip to main content

set_num_threads

Function set_num_threads 

Source
pub fn set_num_threads(n: i32) -> Result<(), Error>
Expand description

Set the OpenMP width for the next call. Zero restores the library default.

The width is process-global. Do not call this while another thread is inside the library.

seams::set_num_threads(1)?;
assert_eq!(seams::num_threads(), 1);