Asynchronous Methods and Parallel Loops
In this chapter, you have learned about two simple alternatives to the Task-based parallel programming seen in Chapter 24. You first looked at asynchronous methods, which pre-date the Task Parallel Library. These methods can be used with library classes that implement Begin and End methods and, via delegates, with any method you are interested in. You also saw how to create a Task from an asynchronous method so that it can be used as the foundation for a continuation chain (see Chapter 24 for details of Task chains).
You also looked at parallel loops, which are built on the TPL and allow you to create parallel versions of the for and foreach loop. These loops can deliver significant performance increases over their sequentially-executed counterparts and are quick and simple to implement.
KeywordsState Object Library Class Parallel Loop Callback Method Character Grape
Unable to display preview. Download preview PDF.