In the previous chapter, we introduced the concept of parallel programming. In this chapter, we will move on to discussing TPL and task parallelism.
One of the major goals of .NET as a programming framework is to make a developer's life easier by wrapping up all the commonly required tasks as APIs. As we have already seen, threads have existed since the earliest versions of .NET, but they were initially very complex and were associated with a lot of overhead. Microsoft has introduced a lot of new parallel primitives that make it easier to write, debug, and maintain parallel programs from scratch, without having to deal with the complexities that are involved with legacy threading.
The following topics will be covered in this chapter:
- Creating and starting a task
- Getting results from finished tasks
- How to cancel tasks
- How to wait on running tasks
- Handling...