O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

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

Summary

This chapter showed you how the C# 5.0 asynchronous methods and await expression language features simplify the building of responsive and scalable applications. Asynchrony is key to avoid blocking of threads, which has been very hard to get right in the past because of the invasive code restructuring required to work with the APM and EAP patterns.

Built on top of the Task-based Asynchronous Pattern (TAP), the language features for asynchronous programming provide an easier way to build asynchronous methods. Instead of having to reshuffle a logical flow of control into a bunch of continuations, await expressions leave this complex task to the compiler. As a result, you can focus on the job at hand, rather than on the plumbing required. ...

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