Chapter 6. Making Apps Responsive with Asynchronous Programming

This chapter will introduce you to asynchronous programming. This chapter will cover the following recipes:

  • Return types of asynchronous functions
  • Handling tasks in asynchronous programming
  • Exception handling in asynchronous programming

Introduction

Asynchronous programming is an exciting feature in C#. It allows you to continue program execution on the main thread while a long-running task runs in its own thread separately from the main thread. When this long-running task is complete, it will let the main thread know that it has completed (or failed). The benefit of asynchronous programming is that it improves the responsiveness of your application. The best way to learn and understand ...

Get C# Programming Cookbook 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.