Last post Nov 07, 2016 09:29 PM by DevManNZ1981
Oct 28, 2016 01:49 AM|DevManNZ1981|LINK
I would like to know what to use when task vs async await.
Oct 28, 2016 04:27 AM|lextm|LINK
Rule of thumb is to use async/await whenever you can, and turn to raw Task when async/await is not enough. The more you learn both, the clearer you understand why.
Oct 30, 2016 06:50 AM|Cathy Zou|LINK
Task: Represents an asynchronous operation
async await：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 the Windows Runtime to create an asynchronous method almost as easily as you create a synchronous
Asynchronous methods that you define by using async and await are referred to as async methods.
For more information, please refer to the following links;
Oct 30, 2016 07:01 AM|Nasser Malik|LINK
You order your lunch from the waiter at the restaurant. A moment after giving your order, a friend walks in and sits down next to you and starts a conversation. Now you have two choices. You can ignore your friend until the task is complete -- you can wait
until your soup arrives and do nothing else while you are waiting. Or you can respond to your friend, and when your friend stops talking, the waiter will bring you your soup.
Task.Wait blocks until the task is complete -- you ignore your friend until the task is complete. await keeps processing messages in the message queue, and when the task is complete, it en-queues a message that says "pick up where you left off after that
await". You talk to your friend, and when there is a break in the conversation the soup arrives.
Read following for better understanding
Nov 07, 2016 09:29 PM|DevManNZ1981|LINK
Nice explanation but may I know what to use when? Task or async . Correct me If I am wrong