I’m busy!

Async in C# 5.0 by Alex Davies

This is a short book. At 100 pages it feels more like an extended essay, but given that its focus is on asynchronous programming in C# 5, it works really well. The book starts with a simple example application – a Windows Forms application which downloads a number of icons from a web site, initially synchronously. This application is improved by making it asynchronous, firstly by using the pre-C# 5 patterns and then using the new Async feature which gets rid of the awkwardness of continuations passing style and use of objects like BackgroundWorker to get things happening on the correct thread.

This book is really good. It discusses the motivation for the Async feature, showing the problems that it seeks to solve, it covers what is happening under the surface without side-stepping issues such as Execution Contexts and Synchronization Contexts, and it gives a good introduction to Tasks and the subset of the task parallel library that is needed for the examples that are used. There are also informative remarks on unit testing Async code, parallelism and actors, and a discussion of how the C# Async feature is connected to the asynchronous operation model that is offered by WinRT.

The book is a quick read, but you will learn something from reading it.

Advertisements
This entry was posted in Books. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s