Asynchronous Programming with Async and Await (C# and Visual Basic)
msdn.microsoft.com
msdn.microsoft.com
http://news.ycombinator.com/item?id=3051142
Perhaps it would be interesting to see how it was done in Twisted: http://http://twistedmatrix.com/documents/current/api/twiste...
We'd like to think that the C# guys were looking our way when they came up with async/await, but there's no proof. :3
Wow so you can have your cake and eat it! await is an accepted "keyword" but it's not actually a keyword as far as parser is concerned. Cool! I wish other compilers were this conscious of backwards compatibility.
Reference: Miguel de Icaza's blog post http://tirania.org/blog/archive/2011/Sep-15.html
http://msdn.microsoft.com/en-us/library/windows/apps/hh46492...
I think that's because the TPL doesn't exist for C++.
I think if the method is named 'Async' (such as GetReplyAsync() *) , you can call it asynchronously with the new await in C#, and using Task<T> as the return type. Only methods that are lableled async implement the new 'await'.
Some of the old .NET methods had 2 API's - synchronous & asyncrhonous. Some of the synchronous implementations, as pointed out in your link, have been deprecated.
A few of the async methods I have seen (which do not have Async in the title), only accept the old IAsync/callback and do not work with await. Presumably, they do not implement the new C#5 style of async yet. Hopefully, they will at some point, because I'm a big fan of how clean & readable async C# can be now.
Again I haven't explored C#5.0 thoroughly, these are just my first impressions.