The Task Parallel Library's dataflow is a new library that is designed to increase the robustness of highly concurrent applications. TPL dataflow uses asynchronous message passing and pipelining to obtain more control and better performance than manual threading.
A dataflow consists of a series of blocks. Each block can be a source or target for data. Data typically enters into a dataflow by being posted to a propagation block, which is a block that implements ISourceBlock<T>
and ITargetBlock<T>
. The source block can be linked to other target or propagation blocks. The data flows from one block to the next block in the chain asynchronously. The data is buffered at the source or target block until it is needed.
The predefined blocks fall into three categories. There are buffering blocks which hold data for use by data consumers, there are execution blocks that call a user-provided delegate for each piece of received data, and there are grouping blocks which combine...