Yesterday evening saw Mads Torgersen and Lucian Wischik from the C# and VB teams respectively give a presentation to the London .net user group regarding the new Async functionality that has recently been released as a CTP addon to studio 2010. The guys are on tour, with the same core presentation that Anders gave at PDC, but in the context of the user group setting there was a lot more audience participation that pulled it in a different direction making it a useful follow-on.
One of the main messages that keeps cropping up in any discussion of the new feature is that it is not about spinning up new threads and making use of all those cores that we find in machines these days. It is about the orchestration of asynchronous tasks, allowing us developers to write code as if it were nice easy synchronous code, without all the callbacks for completion or failure. Creating methods that actually do work in parallel is a whole different matter.
As someone with only a few dribs and drabs of experience running code asynchronously, the demos I’ve seen so far are very compelling. The code is far far easy to write and understand using the new keywords, rather than manually prodding in all of the callbacks. Most of the emphasis has been on rich client code, whereas I spend most of my time in ASP.net at the moment, but the messages coming from MS are that we’ll be able to help servers to scale better by not blocking threads that are waiting for other services. Whether this is useful for relatively quick connections like hitting a big database server with a super high speed lan connection as opposed to slow things such as going out to web services across the internet will determine how useful this ends up being to me.
I’d like to quote a paragraph from Jon Skeet’s blog that seems to sum it all up well:
No comments:
Post a Comment