Straighten Spaghetti Code with C# 5

Jon SkeetDate/Time:
Thursday 11 October 2012, 6.00pm

The Davidson Building, 5 Southampton Street, London WC2E 7HA. The nearest underground stations are Covent Garden and Charing Cross.

Jon Skeet


Release 5 of the C# programming language provides many new features to support programmers who write asynchronous programs. This talk will look at those features in detail and answer some important questions: What is asynchrony and why is it important (and why it's not the same as concurrency)? What were the problems with previous approaches and how do the new features of C# address them? How is asynchrony implemented by the compiler and supported by framework features?

Until now, writing asynchronous code in C# has been hard. It's been hard to write, hard to reason about, hard to debug and hard to test. However hard you try to keep it clean, there's been a certain spaghetti-like aspect to asynchronous code. C# 5's async features change all that, allowing you to write methods which read from top to bottom - but occasionally take a break in the middle while they await something else happening. The compiler does all the hard work of keeping your code's logical structure intact across the multiple calls which are required, leaving you to think about the inherently difficult bits of asynchrony, should they crop up.

This talk will show what asynchronous methods look like and how they are implemented. Whilst initially this may seem complex, the speaker promises to try to restore your sanity by the end of the evening.

About the Speaker:

Jon Skeet works as a software engineer for Google and is the author of 'C# in Depth', published by Manning in 2010. Now in its second edition, this book has been widely praised and is also regarded as 'shorter than most other C# books'.


Free, but to gain admission please email your name to our Membership Secretary, Algirdas Pakstas, at

AGM and Reception

This meeting will be followed by the Annual General Meeting of the Advanced Programming SG and a free buffet reception. All members are warmly invited to take this opportunity for networking and further discussion. If you are interested in standing for election to the committee, please contact the Chairman at


View the slides for this event (PDF)
View the YouTube video of the event
View or participate in the LinkedIn discussion