Chapter 5. C# Language Support for Asynchrony

The Task Parallel Library makes it possible to combine asynchronous tasks and set dependencies between them. In the previous chapter, we reviewed this topic in detail. However to get a clear understanding in this chapter, we will use this approach to solve a real problem—downloading images from Bing (the search engine). Also, we will do the following:

  • Implement standard synchronous approach
  • Use Task Parallel Library to create an asynchronous version of the program
  • Use C# 5.0 built-in asynchrony support to make the code easier to read and maintain
  • Simulate C# asynchronous infrastructure with the help of iterators
  • Learn about other useful features of Task Parallel Library
  • Make any C# type compatible with built-in ...

Get Mastering C# Concurrency now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.