15Asynchronous Programming
WHY ASYNCHRONOUS PROGRAMMING IS IMPORTANT
The .NET Framework 4.5 added the Task Parallel Library (TPL) to .NET to make parallel programming easier. C# 5.0 added two keywords to make asynchronous programming easier: async and await. These two keywords are the main focus of this chapter.
With asynchronous programming a method is called that runs in the background (typically with the help of a thread or task), and the calling thread is not blocked.
In this chapter, you can read about different patterns on asynchronous programming such as the asynchronous pattern, the event-based asynchronous pattern, and the task-based asynchronous pattern (TAP). TAP makes use of the async and await keywords. When you compare these patterns, you can see the real advantage of this style of asynchronous programming.
After discussing the different patterns, you see the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access