Struct workpool::static_pool::StaticPool
source · pub struct StaticPool<I, W, R>where
W: Worker<I>,
R: Reducer<W::Output>,{ /* private fields */ }
Expand description
StaticPool is a pool with a static concurrency limit.
Implementations§
source§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,
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,
sourcepub fn wait_handle(self) -> WaitHandle<R::Output>
pub fn wait_handle(self) -> WaitHandle<R::Output>
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.