Skip to main content

set_gomaxprocs

Function set_gomaxprocs 

Source
pub fn set_gomaxprocs(n: usize) -> usize
Expand description

Set the number of logical processors and return the previous value.

See [runtime::sched::set_gomaxprocs] for full semantics.

ยงExample

let old = go_lib::set_gomaxprocs(2);
println!("was {old}, now {}", go_lib::gomaxprocs());