title: What is the advantage of a parallel pipeline compared with Task Parallelism?
body: <p>I often read about the pipeline pattern as a common and helpful pattern in terms of exploiting concurrency. But I wonder if there is <strong>any</strong> advantage of the parallel pipeline pattern compared with the Task Parallel Pattern.</p>
  
  <p>Suppose we have three stages in a pipeline: A, B, C. When data needs to be processed A takes it, processes it and hands it over to B. When the next data chunk is coming in, the same happens and A and B are working concurrently. </p>
  
  <p>So different stages in the pipeline can be executed in parallel, but when we use <strong>three</strong> pipelines working in parallel (as in Task Parallelism Pattern), we get exactly the same picture. When two data chunks are coming in one after another, the first chunk is taken by Pipeline 1, the next chunk is taken by Pipeline 2 and both chunks are processed concurrently.</p>
  
  <p>Furthermore I can easily imagine a lot of problems in parallel Pipeline: The Buffer between the stages could block (or overflow), one stage is dominating in terms of processing speed so all stages before the slowest stage have to wait etc...</p>
  
  <p>These problems do not exist in the Task Parallelism Pattern. Additionally, this pattern is more flexible when the chunks are coming in faster than the first stage of the pipeline can process them (or they can be fetched concurrently). </p>
  
  <p>So why should I ever use the parallel pipeline pattern?</p>
  
  <p>Thanks in advance for any ideas!</p>