[−][src]Struct workpool::static_pool::StaticPool
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]
I: Send + 'static,
W: Worker<I> + Send + Sync + 'static,
W::Output: Send,
R: Reducer<W::Output> + Send + 'static,
R::Output: Send + Sync,
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]
I: Send + 'static,
W: Worker<I> + Send + Sync + 'static,
R: Reducer<W::Output> + Send + 'static,
R::Output: Send + Sync,
type Output = R::Output
type WaitHandle = WaitHandle<R::Output>
fn add(&self, input: I)
[src]
fn wait_handle(self) -> Self::WaitHandle
[src]
fn wait(self) -> R::Output
[src]
impl<I: Debug, W: Debug, R: Debug> Debug for StaticPool<I, W, R> where
W: Worker<I>,
R: Reducer<W::Output>,
[src]
W: Worker<I>,
R: Reducer<W::Output>,
Auto Trait Implementations
impl<I, W, R> Send for StaticPool<I, W, R> where
I: Send,
R: Send,
W: Send,
I: Send,
R: Send,
W: Send,
impl<I, W, R> Sync for StaticPool<I, W, R> where
I: Send,
R: Send,
W: Sync,
I: Send,
R: Send,
W: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.