Build a robust concurrent program in CSharp is not so easy, you need to check shared contexts, thread-safety classes, implement locks and semaphores. Inside the TPL namespace we have Dataflow, an official extensions that can reduce some of those complexities.
Dataflow promotes an actor-based programming model and provide blocks that can be chained in complex pipelines to stream your data in-process.
This is useful when you have multiple operations that must communicate asynchronously or when you want to process data as it becomes available.
It also gives you explicit control over how data is buffered and moves in this flow.
A dataflow pipeline is a series of components or blocks that can be joined.
We are going to cover some of them in the examples: