A tool for constructing multi-threaded pipelines of execution
A Pipeline consists in one or more PipelineEntrys that each runs in its
own thread (or multiple threads in the case of Multiplex). They take in
items from the previous entry and produce items for the next entry, similar
to a Unix pipeline. This allows for expressing computation as a series of
steps that feed into each other and run concurrently
Examples
Build the first 10 fibonacci numbers:
use Pipeline;
let buffsize = 5;
else }
let nums: = .collect;
let fibs: = new
.map
.into_iter.collect;
Build the first 10 fibonacci numbers in parallel:
use Pipeline;
use Multiplex;
use Mapper;
let buffsize = 5;
let workers = 2;
else }
let nums: = .collect;
let fibs: = new
.then
.into_iter.collect;