Function jemalloc_ctl::set_max_background_threads [−][src]
pub fn set_max_background_threads(max_background_threads: usize) -> Result<()>
Sets the maximum number of background threads that will be created.
extern crate jemallocator; extern crate jemalloc_ctl; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; fn main() { jemalloc_ctl::set_max_background_threads(1).unwrap(); assert_eq!(jemalloc_ctl::max_background_threads().unwrap(), 1); }