2010 | OriginalPaper | Buchkapitel
Asynchronous Methods and Parallel Loops
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
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.