Async in C# 5.0
Async in C# 5.0

Author: Alex Davies
Publisher:  O'Reilly
Pages: 108
ISBN: 978-1449337162
Audience: C# programmers
Rating: 5
Reviewer: Mike James

Asynchronous programming is all the rage and there is an argument that nobody does it better than C# 5.0 and its async commands. 

Asynchronous programming is rapidly becoming the norm with most programming languages and environments providing some sort of asynchronous operation if only simple events. The problem is that asynchronous programming is difficult and messy because it alters the order of execution from what is written to something altogether different. There are a number of attempts to make it easier and less error prone, but C#''s async commands are perhaps the best so far. Essentially using the commands Async and await you can write asynchronous code that looks like synchronous code and the compiler will perform the necessary conversions to effectively implement a callback without you having to worry. 

Banner

The new Async features in C# 5.0 are a small but important addition and so it isn't unreasonable that this can be covered in a small book but you might be surprised at a book less than 100 pages on the subject. In fact unless you want some really deep coverage it does deal with the subject very well. The first two chapters do a good job of introducing the idea asynchronous behavior. Chapter 3 outlines the manual ways you can write asynchronous code - call backs and the Task object. Chapter 4 then introduces the basic use of Async and await. At this point you should be very clear why using Async and await is the best approach and you should also have the basic use patterns sorted out. 

 

async

 

Chapter 5 explains what await actually does, i.e.how it is implemented and this leads on to a natural discussion of where it can't be used for one reason or another. There is a later chapter that goes into how the compiler transform works.

Chapter 6 is about the task asynchronous pattern and chapter 7 presents some useful Async utilities. Chapter 8 explains which thread runs your code and the lifecycle of an async operation. Chapter 9 deals wit the tricky topic of exceptions in asynchronous code. 

Chapter 10 moves a little beyond simple asynchronous code to consider how you can use await with threads and locks. Chapter 11 is about unit testing and asyc code. 

The next two chapters are about using async in ASP.NET and in WinRT. The final chapter does much deeper into the implementation of Async with a look at the compiler transformations. 

This is a short look at a fairly self-contained subject that can be covered in the space allocated. It is well written and the examples it presents are helpful rather than confusing but you are the sort of reader that wants lots of real-world examples you might be disappointed. For me they got the points across very effectively.

If you want to know what Async and await are all about then this is a quick and painless way to add them to your C# toolkit.

Banner


Mastering Azure Analytics

Author: Zoiner Tejada
Publisher: O'Reilly
Pages: 412
ISBN: 978-1491956656
Print: 1491956658
Kindle: B06Y3G2WKN
Audience: Azure developers
Rating: 4.5
Reviewer: Kay Ewbank

This is a good introduction to using Azure Data Lake, HDInsight and Spark, their terminology and ideas. 



Metaprogramming Ruby 2

Author: Paolo Perrotta
Publisher:  Pragmatic Bookshelf
Pages:250 
ISBN: 978-1941222126
Print: 1941222129
Kindle: B00N9I0RMQ
Audience:Ruby programmers
Rating: 5
Reviewer: Ian Elliot

A second edition of a book that claims to teach you "meta" programming. Isn't just programming h [ ... ]


More Reviews

 

Last Updated ( Tuesday, 23 April 2013 )
 
 

   
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2018 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.