[−][src]Enum dynpool::Scale
A goal for the worker pool. This describes the scale that the pool should attempt to reach.
Variants
Shutdown
Shutdown the pool.
Active(usize)
Maintain the given number of active workers. Inactive worker threads are shutdown.
Mixed
Maintain the given number of active workers, and up to the given number of inactive workers. Any extra inactive worker threads are shutdown.
Fields of Mixed
NoTerm
Maintain the given number of active workers, and an unlimited number of inactive workers. No worker threads will be terminated unless one panics.
Fields of NoTerm
active: usize
Number of active workers.
Methods
impl Scale
[src]
pub fn shutdown() -> Scale
[src]
Shutdown the pool.
pub fn active(num: usize) -> Scale
[src]
Scale to exactly the given number of workers.
pub fn mixed(active: usize, max_inactive: usize) -> Scale
[src]
Scale to the given number of active workers and no more than the given number of inactive workers.
pub fn no_term(active: usize) -> Scale
[src]
Scale to the given number of active workers without shutting down any inactive workers.
pub fn worker_count(self) -> usize
[src]
How many active workers should the pool scale to?
Trait Implementations
impl Clone for Scale
[src]
fn clone(&self) -> Scale
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Scale
[src]
impl Debug for Scale
[src]
Auto Trait Implementations
impl Send for Scale
impl Unpin for Scale
impl Sync for Scale
impl UnwindSafe for Scale
impl RefUnwindSafe for Scale
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,