Control-Engine-0.0.1: A parallel producer/consumer engine (thread pool)




threadPool :: Int -> (a -> b) -> IO (Chan a, Chan b)Source

A trival thread pool for pure functions (mappings). Simply specify the number of threads desired and a mutator function.

threadPoolIO :: Int -> (a -> IO b) -> IO (Chan a, Chan b)Source

A trivial thread pool that allows IO mutator functions. Evaluation of output is not strict - force evaluation if desired!