C# Async/Await and Task Parallel Library
Published by Carlos Blé on 29/05/2015
In order for a native desktop application to be responsive, I mean, not to freeze while sending a request over the network or processing a heavy CPU operation, these operations have to run in a separate thread.
Powerful features, comfortable to develop with but it’s important to know how they work behind scenes. Otherwise you could get in trouble with deadlocks and invalid operation exceptions.
Sample app: https://bitbucket.org/carlosble/asyncawait - Look at MainWindow.xaml.cs file.
The app is just a window with a bunch of buttons and a text field. Every button has an event handler in the MainWindow.xaml.cs that exercises each use case.
The method names in that file along with some comments, explain the most remarkable features for our team right now.
Originally published in Carlos Blé's blog.