[−][src]Struct threads_pool::Config
Implementations
impl Config
[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_pool_name(&mut self, name: String) -> &mut Self
[src]
fn set_refresh_period(&mut self, period: Option<Duration>) -> &mut Self
[src]
fn set_worker_behavior(&mut self, behavior: StatusBehaviors) -> &mut Self
[src]
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.
fn set_thread_size(&mut self, size: usize) -> &mut Self
[src]
fn set_timeout_policy(&mut self, policy: TimeoutPolicy) -> &mut Self
[src]
impl Default for Config
[src]
impl StatusBehaviorSetter for Config
[src]
fn set_before_start(&mut self, behavior: fn(id: usize))
[src]
fn set_after_start(&mut self, behavior: fn(id: usize))
[src]
fn set_before_drop(&mut self, behavior: fn(id: usize))
[src]
fn set_after_drop(&mut self, behavior: fn(id: usize))
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,