[−][src]Trait threads_pool::ConfigStatus
Required methods
fn pool_name(&self) -> Option<&String>
fn refresh_period(&self) -> Option<Duration>
fn worker_behavior(&self) -> &StatusBehaviors
fn non_blocking(&self) -> bool
fn thread_size(&self) -> usize
fn timeout_policy(&self) -> TimeoutPolicy
fn set_pool_name(&mut self, name: String) -> &mut Self
fn set_refresh_period(&mut self, period: Option<Duration>) -> &mut Self
fn set_worker_behavior(&mut self, behavior: StatusBehaviors) -> &mut Self
fn set_none_blocking(&mut self, non_blocking: bool) -> &mut Self
fn set_thread_size(&mut self, size: usize) -> &mut Self
fn set_timeout_policy(&mut self, policy: TimeoutPolicy) -> &mut Self
Implementors
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.