0
Async Await
Howard 2013/10/04
Async Methods Are Easier toWrite
• The Async and Await keywords inVisual Basic and the async and await
keywords in C# are ...
Async Methods Are Easier toWrite
• The following characteristics summarize what makes the previous example an
async method...
Async Await –
WebClient sample
What Happens in an Async Method
•
Thread
Thread
• 開啟Thread 的地方,也很難從呼叫的方法取得回傳值
Task
Async Await
References
• http://msdn.microsoft.com/zh-
tw/library/hh191443.aspx#BKMK_WhatHappensUnderstandinganAsyncMe
thod
• http://m...
Upcoming SlideShare
Loading in...5
×

20131004 - Async await by Howard

164

Published on

20131004_Async await - howard

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
164
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "20131004 - Async await by Howard"

  1. 1. Async Await Howard 2013/10/04
  2. 2. Async Methods Are Easier toWrite • The Async and Await keywords inVisual Basic and the async and await keywords in C# are the heart of async programming. By using those two keywords, you can use resources in the .NET Framework or theWindows Runtime to create an asynchronous method almost as easily as you create a synchronous method. Asynchronous methods that you define by using async and await are referred to as async methods.
  3. 3. Async Methods Are Easier toWrite • The following characteristics summarize what makes the previous example an async method. • The method signature includes an Async or async modifier. • The name of an async method, by convention, ends with an "Async" suffix. • The return type is one of the following types: • Task<TResult> if your method has a return statement in which the operand has typeTResult. • Task if your method has no return statement or has a return statement with no operand. • Void (a Sub inVisual Basic) if you're writing an async event handler. • The method usually includes at least one await expression, which marks a point where the method can't continue until the awaited asynchronous operation is complete.
  4. 4. Async Await – WebClient sample
  5. 5. What Happens in an Async Method •
  6. 6. Thread
  7. 7. Thread • 開啟Thread 的地方,也很難從呼叫的方法取得回傳值
  8. 8. Task
  9. 9. Async Await
  10. 10. References • http://msdn.microsoft.com/zh- tw/library/hh191443.aspx#BKMK_WhatHappensUnderstandinganAsyncMe thod • http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx • http://studyhost.blogspot.tw/2012/06/metro-style-appnet-45.html
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×