O'Reilly logo

C# Multithreaded and Parallel Programming by Rodney Ringler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. The Asynchronous Programming Model

In this chapter, we will be learning about the new async and await keywords provided in .NET 4.5, along with the Asynchronous Programming Model (APM). The async and await keywords are .NET's latest method for making asynchronous and multithreaded programming simple for the developer. These new keywords make using the BackgroundWorker component harder to justify. The async keyword makes it seamless to turn an ordinary method into an asynchronous method that runs on a separate thread. Then you can continue processing in the main thread. When you are ready to wait for the results of the asynchronous method, you can then use the await keyword in your main thread to block until the method returns.

The Asynchronous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required