Language Support for Asynchronous Programming
- Date: April 3, 2012 from 1:40PM to 2:20PM
- Day 2
- Speakers: Mads Torgersen
- 30,227 Views
- 5 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Slides (view online)Asynchronous programming is what the doctor usually orders for unresponsive client apps and for services with thread-scaling issues. This usually means a bleak departure from the imperative programming constructs we know and love into a spaghetti hell of callbacks and signups. C# and VB are putting an end to that, reinstating all your tried-and-true control structures on top of a future-based model of asynchrony.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
I'm glad to see so many questions about async\await. Hopefully a similar pattern will show up in other languages... hint, hint, C++
Keep up the amazing work!!!
And it even works on the latest mono
http://blog.bekijkhet.com/net-4-5-new-async-library-on-visual-studio-11-beta-and-latest-mono/
Is the source code for that sample app available anywhere?
@AceHack: it is possible to wait for the result of an asynchronous operation in C++ using PPL tasks.
It may need conversion from IAsyncOperation<> to a Concurrency::task<> and then you can use Concurrency::task<>::get() to comfortably achieve the same thing as await.
@milgner I think this would be a blocking wait and it think it will only work in Metro style apps. I was really hoping for a await language feature in C++ that would do the auto continuation (state machine) kind of thing like C# (Non Blocking). Herb mentioned having this language feature possibly in the future with his talk here http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/-Not-Your-Father-s-C-
It took a while for that video to go up so I was completely unaware that Herb was already thinking about await as a C++ language extension or I would not have mentioned it again. Thanks all language guys at Lang.Next, I've been very impressed.
Remove this comment
Remove this thread
close