Chapter 7: Task Parallel Library (TPL) and Dataflow

The Task Parallel Library (TPL) dataflow library contains building blocks to orchestrate asynchronous workflows in .NET. This chapter will introduce the TPL Dataflow library, describe the types of dataflow blocks in the library, and illustrate some common patterns for using dataflow blocks through hands-on examples.

The dataflow library can be useful when processing large amounts of data in multiple stages or when your application receives data in a continuous stream. The dataflow blocks provide a fantastic way of implementing the producer/consumer design pattern.

To understand this, we will create a sample project that implements this pattern and examine other real-world uses of the dataflow ...

Get Parallel Programming and Concurrency with C# 10 and .NET 6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.