Task Await Async
Here I demonstrate the use of .NET 4.5 new sync programming, that leverages asynchronous support
in the .NET Framework 4.5 and the Windows Runtime.
The compiler does the difficult work that the developer used to do, and your application retains
a logical structure that resembles synchronous code. As a result, you get all the advantages of
asynchronous programming with a fraction of the effort.
Wait 3-4 seconds for all tasks to complete!
For ref:
https://www.youtube.com/watch?v=MCW_eJA2FeY
And angular
https://github.com/curran/screencasts/tree/gh-pages/introToAngular
Run Task Await Async example
On page load we are calling a web service to execute 3 async tasks
The Tasks length is 3,2 and 1 seconds.
If would run synchronously would take 6 seconds, but we run async one 1 single thread! using await and async!
It will take only 3 seonds (the length of the longest task) to complete!
| When the 3 async tasks are done the result will be shown below |
|---|
|
{{myReturnedStatus}}
|