[][src]Struct thread_binder::ThreadPoolBuilder

pub struct ThreadPoolBuilder { /* fields omitted */ }

Same as rayon's ThreadPoolBuilder expect you get an extra bind method.

Methods

impl ThreadPoolBuilder[src]

pub fn new() -> Self[src]

Creates a new ThreadPoolBuilder. We bind to numa by default.

pub fn bind(self, bind_policy: Policy) -> Self[src]

Set binding policy.

pub fn start_handler<H>(self, start_handler: H) -> Self where
    H: Fn(usize) + Send + Sync + 'static, 
[src]

pub fn num_threads(self, num_threads: usize) -> Self[src]

Set number of threads wanted.

pub fn build(self) -> Result<ThreadPool, ThreadPoolBuildError>[src]

Build the ThreadPool.

pub fn build_global(self) -> Result<(), ThreadPoolBuildError>[src]

Build the global ThreadPool.

Trait Implementations

impl Default for ThreadPoolBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]