How Async and Await work under the hood in C#

preview_player
Показать описание
You use async/await keywords everyday when working with C#, but do you know how they work under the hood?
Do you know what exactly is Task and how it should be used?

00:00 Intro
00:11 What is a Task
02:14 What async and await keywords mean
03:45 How async improves synchronous code
05:59 DOs and DONTs of async
Рекомендации по теме
Комментарии
Автор

Great video on a difficult topic. Thanks!

AllAboutDataTechnology
Автор

Never use `Wait`, I agree. That also applies to `Result` and a few other blocking methods. Great explanation. Hope you can dive into the ‘promise of completion’ pattern next. It’s a little understood behind the scenes architecture detail.

Misteribel
Автор

Thank you for the video. I found it very helpful.

FunWithBits
Автор

Very good. Better than many others I viewed

kaihusravnajmiddinov
Автор

Regarding Asyn suffix. Its advisable to add this suffix 1) when you have synchorios version of the same method in the same class 2) if this method is async void then IDE might not help 3) just to increase readability.

basimal-jawahery
Автор

The advise on using Task ctor is flawed. There are many scenarios to create not started tasks.... If you don't have any specific requirements to create a task, you don't need to use factory, just use the Task ctor.

activex
Автор

there is difference ?

Task firstjobAsync() => secundJobAsync()
To
async Task firstjobAsync() => await secundJobAsync()

mychelldias
Автор

there is nothing "under the hood" in this video!!

HakunaMatata