Pipelines
So far, I have discussed two different categories of problems that can be solved using patterns. In the first category, there are long operations that we just want to push into the background. We are happy with the execution time, but we would like to keep the user interface responsive, so we need to execute them in a background thread. Async/Await and Future are the tools for this occasion.
In the second category, there are problems that can be split into parts that are independent or mostly independent of each other. We can use Join, Join/Await, or Parallel for to parallelize them and implement the “mostly independent” part with locking or interlocked operations.
This, however, doesn’t even nearly cover all use cases. There’s at least one big category left that is not trivial to parallelize with the Parallel Programming Library tools. I’m talking about problems that are hard to split into parts but where operations executed on a...