[][src]Struct threads_pool::Config

pub struct Config { /* fields omitted */ }

Implementations

impl Config[src]

pub fn new() -> Self[src]

Trait Implementations

impl Clone for Config[src]

impl ConfigStatus for Config[src]

fn pool_name(&self) -> Option<&String>[src]

Check the pool name from the config, if it's set

fn refresh_period(&self) -> Option<Duration>[src]

Check the auto balancing period for the index_mode

fn worker_behavior(&self) -> &StatusBehaviors[src]

Obtain a copy of the status behavior object

fn non_blocking(&self) -> bool[src]

Check if the config has turned on the non_blocking mode

fn thread_size(&self) -> usize[src]

Check the desired stack size for each thread in the pool

fn timeout_policy(&self) -> TimeoutPolicy[src]

Check the timeout policy for the job

fn set_none_blocking(&mut self, non_blocking: bool) -> &mut Self[src]

Toggle on/off of the pool's non-blocking mode. If the pool is in the non-blocking mode, the ThreadPool will take the job submission and move on immediately, regardless of if the job submission is successful or not.

Please use cautious when toggling the pool to the non-blocking more: if the pool is busy (i.e. all thread workers are busy) and the job queue is full, a new non-blocking job submission will cause the job to be dropped and lost forever.

impl Default for Config[src]

impl StatusBehaviorSetter for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

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> Erased for T

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.