Async/Await in C# - How it works and how to use it

preview_player
Показать описание

In this episode, we take a look at how C# 5's language-level support for writing asynchronous code works. Async and Await makes it possible to write and use asynchronous code with the simplicity of less complex synchronous code, but do you really understand how it works?
Рекомендации по теме
Комментарии
Автор

Spent a lot of time trying to find material to explain async await to me, but wasn't able to understand anything. You explained how it works, and under 6 minutes! Good job and thanks!

ZetwayBROX
Автор

After a thousand years, I've finally got it!! the best explanation ever.

spiralni
Автор

Good quick explanation on async ops especially for a non-hardcore programmer as like myself. Thanks for sharing the information.

techcat
Автор

What a great explanation in record time, very straight and precise is what makes this video great!

moherna
Автор

I was always so confused by Async and await and was always very insecure on how to use it. The decompiling was the best explanation I ever saw! Thanks a lot!

xantor
Автор

Went through 3 pages to find something like this! Great video!

granttapp
Автор

You’ve made it so clear! Took me so long to find a clear and concise video. Thanks!

wahiduddin
Автор

so the cost of async/await is the additional memory required for the state machine, i guess? Is that even worth considering?

arandomambipom
Автор

One of the best explanations for async/await!! Great job!

mukulpandya
Автор

So, that means that under the hood async is using an automated multithreading aproach?

calmsht
Автор

Hi, from where i can get the complete code of this tutorial ?

kcvinu
Автор

This video is brilliant! I really appreciate the depth and clarity you have managed to go into in only 6 minutes. Well done!

mrlildylchillin
Автор

Will the async code span a new thread while the rest of your code executes?

lapincheriatota
Автор

does await block the next line of code? or does it run together with other tasks?

lets say I have a code to write two files

var task1 = Task.Run(async () => await
var task1Res =

var task2 = Task.Run(async () => await
var task2Res =

will task2 execute while task1 is running? or will it wait for task1 to complete before it executes?

hk-four-sixteen
Автор

await was so confusing because to me at least, it does exactly the OPPOSITE of what I would expect it to...it makes the program NOT wait for the function to finish...you'd think "await" would "await" a result (which happens by default I know) but it does the opposite? wtf

rarespetrusamartean
Автор

I've looking for about 8 hours trying to understand Async/Await on non async methods. Thanks very much for explaining it all and in under 7 minutes! I nearly gave up but luckily found this video

lincolnwhite
Автор

The presentation is simply superb and really professional!! Great job!!

aniljain
Автор

I am working on understanding what the async and await keywords are doing behind the scenes. This made it a lot clear. Thanks!

curryjl
Автор

Well done! really good explanation, much prefer the bare bones, to a WPF button example. Special points for the generated code dive <3

RawCoding
Автор

1:20 "Methods marked with async are not asynchronous."

WHY DID NOBODY TELL ME THIS UNTIL NOW.

markw.schumann