First, as @usr suggested, your case fits a single ActionBlock
. The point of linking multiple blocks is to compose different types of blocks with different configurations. For example if you had one step with MaxDegreeOfParallelism
of 1, and another with 10.
Second, MaxDegreeOfParallelism
sets the maximum, which means that the TPL
can choose any number in that range according to the availability of resources. So I wouldn't fear setting the maximum value for all those blocks, and if TPL
decides it's better to use less threads, it will.
From How to: Specify the Degree of Parallelism in a Dataflow Block
Because the MaxDegreeOfParallelism property represents the maximum degree of parallelism, the dataflow block might execute with a lesser degree of parallelism than you specify. The dataflow block can use a lesser degree of parallelism to meet its functional requirements or to account for a lack of available system resources. A dataflow block never chooses a greater degree of parallelism than you specify.