[][src]Struct workpool::static_pool::StaticPool

pub struct StaticPool<I, W, R> where
    W: Worker<I>,
    R: Reducer<W::Output>, 
{ /* fields omitted */ }

StaticPool is a pool with a static concurrency limit.

Methods

impl<I, W, R> StaticPool<I, W, R> where
    I: Send + 'static,
    W: Worker<I> + Send + Sync + 'static,
    W::Output: Send,
    R: Reducer<W::Output> + Send + 'static,
    R::Output: Send + Sync
[src]

pub fn add(&self, input: I)[src]

Add a work item to be done by the pool.

pub fn wait_handle(self) -> WaitHandle<R::Output>[src]

Return a wait handle. This indicates that no new work will be added to the pool and wait() can be invoked on the returned handle to wait for all input to be processed and retrieve the output value.

pub fn wait(self) -> R::Output[src]

Wait for all input to be processed and return the output value.

Trait Implementations

impl<I, W, R> Pool<I> for StaticPool<I, W, R> where
    I: Send + 'static,
    W: Worker<I> + Send + Sync + 'static,
    R: Reducer<W::Output> + Send + 'static,
    R::Output: Send + Sync
[src]

type Output = R::Output

type WaitHandle = WaitHandle<R::Output>

impl<I: Debug, W: Debug, R: Debug> Debug for StaticPool<I, W, R> where
    W: Worker<I>,
    R: Reducer<W::Output>, 
[src]

Auto Trait Implementations

impl<I, W, R> Send for StaticPool<I, W, R> where
    I: Send,
    R: Send,
    W: Send

impl<I, W, R> Sync for StaticPool<I, W, R> where
    I: Send,
    R: Send,
    W: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T