[][src]Struct uvth::ThreadPoolBuilder

pub struct ThreadPoolBuilder { /* fields omitted */ }

A factory for configuring and creating a ThreadPool.

Methods

impl ThreadPoolBuilder[src]

pub fn new() -> Self[src]

Create a new factory with default options. Default values are found in the docs for each respective method.

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

Set the amount of threads. If you do not manually set this it will have one thread per logical processor.

pub fn name(self, name: String) -> Self[src]

Set the name of the threads. Not setting this will cause the threads to go unnamed.

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

Set the stack size of the threads. Not setting this will result in platform specific behaviour.

pub fn build(self) -> ThreadPool[src]

Assemble the threadpool.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.