[][src]Struct threads_pool::ThreadPool

pub struct ThreadPool { /* fields omitted */ }

Methods

impl ThreadPool[src]

pub fn new(size: usize) -> ThreadPool[src]

pub fn new_with_config(size: usize, config: Config) -> ThreadPool[src]

pub fn set_exec_timeout(&mut self, timeout: Option<Duration>)[src]

pub fn toggle_auto_scale(&mut self, auto_scale: bool)[src]

pub fn exec<F: FnOnce() + Send + 'static>(
    &mut self,
    f: F,
    prioritized: bool
) -> Result<(), ExecutionError>
[src]

pub fn execute<F: FnOnce() + Send + 'static>(
    &self,
    f: F
) -> Result<(), ExecutionError>
[src]

pub fn execute_with_autoscale<F: FnOnce() + Send + 'static>(
    &mut self,
    f: F
) -> Result<(), ExecutionError>
[src]

Deprecated since 0.1.10:

Setup auto-scale using self.toggle_auto_scale(true), then call function self.exec(...) instead; this API will be removed in 0.2.0

Trait Implementations

impl ThreadPoolStates for ThreadPool[src]

impl PoolManager for ThreadPool[src]

impl PoolState for ThreadPool[src]

impl Drop for ThreadPool[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<T> Erased for T