Crate workpool

source ·

Modules

Traits

Pool allows for parallel processing of items. When creating a pool a Worker and Reducer are provided. The worker accepts input and produces one output value for every input value. The reducer reduces the output from the worker into a single resulting value. Once created you can add input values to the pool using add(). Once all input has been added you can invoke either wait() or wait_handle() to wait for all input to be processed and retrieve the reduced output value.
Reducer is responsible for reducing multiple inputs into a single output. This is used by the workpool to condense multiple work outputs to a single output.
WaitHandle provides a handle to wait for the reduced output value.

Functions

Create a new pool Builder.