Struct jemalloc_ctl::MaxBackgroundThreads[][src]

pub struct MaxBackgroundThreads(_);

A type providing access to 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() {
    let mut max_background_threads = jemalloc_ctl::MaxBackgroundThreads::new().unwrap();
    max_background_threads.set(1).unwrap();
    assert_eq!(max_background_threads.get().unwrap(), 1);
}

Methods

impl MaxBackgroundThreads
[src]

Returns a new MaxBackgroundThreads.

Returns the current background thread limit.

Sets the background thread limit.

Trait Implementations

impl Copy for MaxBackgroundThreads
[src]

impl Clone for MaxBackgroundThreads
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations