Deep .NET: Writing async/await from scratch in C# with Stephen Toub and Scott Hanselman

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии •

  • @majixx
    @majixx 8 месяцев назад +395

    Stephen Toub is an absolute treasure for all .NET developers. We defiantly need more content from him. What a great orator and teacher!!

    • @FilipCordas
      @FilipCordas 8 месяцев назад +37

      You have to give credit to Hanselman as well he is the best at preventing not to know anything when in fact he is probably as knowledgeable as Stephen.

    • @davecenter2002
      @davecenter2002 8 месяцев назад +8

      I love Hanselman and he’s fantastic, but he absolutely is nowhere close to as knowledgeable as Stephen.

    • @shanselman
      @shanselman 8 месяцев назад +74

      @@davecenter2002can confirm. We have different jobs. Plus he kinda wrote the thing. 😂

    • @michaltomorowicz596
      @michaltomorowicz596 8 месяцев назад +6

      when you have two legends in one vid, debating who is a bigger legend is like arguing which type of sugar is sweeter :D awesome content

    • @san30911
      @san30911 7 месяцев назад +2

      Totally. He made me fall in love with C#...

  • @elerius2
    @elerius2 8 месяцев назад +242

    More of this, please! Feels like a channel9 video from back in the day.

    • @dotnet
      @dotnet  8 месяцев назад +51

      Oh we got more!!!

    • @theFijian
      @theFijian 8 месяцев назад +2

      Lol Channel9 really does feel like "back in the day" 🤣

    • @vacc1001
      @vacc1001 7 месяцев назад +1

      @@dotnet Is there a place where I can find more videos like this?

    • @dotnet
      @dotnet  7 месяцев назад +5

      @@vacc1001 We are releasing more and more. Subscribe and checkout the playlist: ruclips.net/p/PLdo4fOcmZ0oX8eqDkSw4hH9cSehrGgdr1

  • @Daysra
    @Daysra 8 месяцев назад +31

    Can I just say how great this duo is. Stephen is awesome at explaining things to a great depth, and Scott knows exactly where to stop and ask for clarifications, at an extent that hits just the sweet spot for me, not being too much. More videos from this duo please.

  • @s.hosseinhosseini8330
    @s.hosseinhosseini8330 8 месяцев назад +100

    This was amazing.
    Why I love this?
    1. Scott Hanselman
    2. Stephen Toub
    3. An actual deep dive into a concept with a high-quality explanation of it.

    • @computer9764
      @computer9764 7 месяцев назад +3

      3.1. It didn't have a ridiculous thumbnail.

  • @tomglenn6019
    @tomglenn6019 8 месяцев назад +95

    I was already very familiar with how tasks/async/await work under the covers but seeing Stephen effortlessly "reimplement" it without copying and pasting or using notes is a humble masterclass of intellectual horsepower.

  • @gpltaylor
    @gpltaylor 7 месяцев назад +18

    When I say that I have watched every video and read every article about async and await, I am not exaggerating. However not a single one has come close to educating what this does, why and how to use it and how this is implemented as this does. This is one of the best videos I have seen on this subject.
    I would love to see more videos like this, that deep dive into the technical rather than floating around at surface level

    • @ghostg6107
      @ghostg6107 7 месяцев назад

      Kevin Gosse also did a deep dive on async await. Stephen Cleary has a walkthrough of the history of Task.

  • @ThorstenSauter
    @ThorstenSauter 8 месяцев назад +59

    This was an absolute delight to watch. Thank you Stephen and Scott!

  • @Anubis10110
    @Anubis10110 8 месяцев назад +45

    Wow we need more topic like this please. We need more of .net core internals

    • @dotnet
      @dotnet  8 месяцев назад +18

      Oh we have more!!!!!

    • @Escalator0921
      @Escalator0921 8 месяцев назад

      Looking forward to more ​@@dotnet

    • @Escalator0921
      @Escalator0921 8 месяцев назад +1

      ​@@dotnetor do you already have a playlist with topics like this

    • @Escalator0921
      @Escalator0921 8 месяцев назад

      Strongly agree

  • @tedchirvasiu
    @tedchirvasiu 7 месяцев назад +33

    I love how Scott asks all the right questions.

  • @pmnm113
    @pmnm113 8 месяцев назад +7

    after watching this I am youtubing about Stephen Toub videos. We need more content from him. I was nice to see low level design of async await here. thanks!

  • @WespazjansDad
    @WespazjansDad 7 месяцев назад +7

    Superb stuff. Scott leads it well, without interrupting too much. And Stephen delivers pure meat. That is one of these few precious resources that despite the fact they last for ah hour, I personally need a few hours to analyze, rewind and make sure all these topics really click in my head.

  • @ArnonDanon
    @ArnonDanon 8 месяцев назад +17

    Scott & Stephen rewriting async await reminded me David & Damian rewriting SignalR on stage. All dotnet devs out there are standing on the shoulders of Giants🙏🏼
    This is great content

    • @metaturso
      @metaturso 7 месяцев назад

      Link please?

  • @JSWarcrimes
    @JSWarcrimes 7 месяцев назад +5

    Now this is some premium content.

  • @MatthiXXY
    @MatthiXXY 3 месяца назад

    Man. I needed this video 12 years ago in some way. I noticed while watching I still have missing knowledge and I am amazed how much you can learn in about an hour. Thanks so much. This was great.

  • @StephenGierek
    @StephenGierek 8 месяцев назад +1

    This was really great! I've always struggled wrapping my head around how async/await works, but this method of instruction is extremely effective in conveying what's going on under the hood. Please, more like this. I could watch these all day long. 🙂

  • @runtimmytimer
    @runtimmytimer 8 месяцев назад +16

    Love this deep dive stuff. Too much 101 content and almost zero 400 content.

  • @ChaseFreedomMusician
    @ChaseFreedomMusician 7 месяцев назад +1

    This is by far one of my favorite videos to-date.

  • @CecilPhillip
    @CecilPhillip 8 месяцев назад +46

    Great video. Would love to see a dive into IAsyncEnumerable implementations

    • @dotnet
      @dotnet  8 месяцев назад +7

      Thanks for the idea! Hope you are doing well Cecil 💖

    • @ChaseFreedomMusician
      @ChaseFreedomMusician 7 месяцев назад

      @@dotnet I would love to see an example implementation of IQueryable, it is so non-approachable even for simple tasks, but it is an incredibly powerful feature.

  • @MatthiWare
    @MatthiWare 8 месяцев назад +9

    Amazing video! I would love to see more content like this.

  • @7th_CAV_Trooper
    @7th_CAV_Trooper 5 месяцев назад +1

    These amazing Hanselman / Toub videos need to be added to a playlist.

    • @dotnet
      @dotnet  5 месяцев назад +2

      Check this out: ruclips.net/p/PLdo4fOcmZ0oX8eqDkSw4hH9cSehrGgdr1

    • @7th_CAV_Trooper
      @7th_CAV_Trooper 5 месяцев назад +1

      @@dotnet awesome!!! Thank you 🙏

  • @prakharlondhe3876
    @prakharlondhe3876 4 месяца назад

    This series is by far my favorite youtube playlist of all time!

  • @bity-bite
    @bity-bite 8 месяцев назад +4

    Great video! I love this style of rewriting stuff to explain how it works internally. We'd love more videos like this one

  • @minimalistdeveloper
    @minimalistdeveloper 8 месяцев назад +3

    Loved this. This is the video equivalent of Csharp in Depth and CLR via Csharp. Kindly do more of these level 300 topics.

  • @gilbertsenyonjo963
    @gilbertsenyonjo963 2 месяца назад

    Wow. I cant say how much I appreciate this series. This video has been one of the best in the series. I followed along and learnt alot.

  • @fullemptiness
    @fullemptiness 8 месяцев назад +2

    What a great idea to teach such a complex topic! It's like you found the missing piece in my (most .NET devs?) understanding to async programming!... Please do a series on async programming like this episode. Thanks!

  • @fredyjimenez4853
    @fredyjimenez4853 8 месяцев назад +2

    This is best explanation to fully understand async/await.
    Greate quality content
    Kudos to Scott and Stephen

  • @vedantkoditkar5968
    @vedantkoditkar5968 8 месяцев назад

    If only there is a way to give million up vote to this video. I always look forwards to Stephen Toub videos, his explanation is top notch.

  • @DannysGalaxyTab
    @DannysGalaxyTab 8 месяцев назад +8

    What a great video idea. Great hosts to listen to as well.

  • @zksward
    @zksward 8 месяцев назад +1

    Really love to see this kind of in depth content coming from the team. We need mooooore!

  • @moke_codes
    @moke_codes 7 месяцев назад +1

    This was amazing! I wish we could see more advanced topics like this. Learned a lot! Thanks guys!

  • @imranhussain8700
    @imranhussain8700 8 месяцев назад +3

    This is some crazy stuff. Stephen Toub is amazing. Scott Hanselman has done a fantastic job as usual for the viewers to ensure the topic is covered as much in depth as possible.
    Thank you very much. We need morrrrrrrrrrrrrrreeeeeeeeeeeeeeeeeee of these for sure.

  • @SajadJalilian
    @SajadJalilian 8 месяцев назад

    We really need Stephen do more live coding. He is really good at delivering what he does

  • @draganradovac8803
    @draganradovac8803 6 месяцев назад

    I was going to skip this one thinking it would be the "same old" about async/await. Boy was I wrong. That was amazing. Thank guys.

  • @SlackwareNVM
    @SlackwareNVM 8 месяцев назад +2

    This was fantastic! I'd love a couple of more episodes that go into the optimizations that can be layered on top of this implementation.

  • @CraigShearer
    @CraigShearer 8 месяцев назад +2

    Great info. Been away from C# for a few years, but nice to see this detailed as to how async/await works.

  • @stephajn
    @stephajn 8 месяцев назад

    Like Admiral Kirk said to Saavik in Wrath of Khan, “You have to know WHY things work on a starship.”
    This was definitely really cool to watch and follow! Gonna have to watch it again on a PC as opposed to my iPad, but it is well worth it!

  • @TheProTip
    @TheProTip 7 месяцев назад

    This is great. I've never actually heard Stephen talk though I've read a bunch of his perf reports and other posts. He presents very well.

  • @Hereson
    @Hereson 8 месяцев назад +1

    Amazing explanation, please do more of these!

  • @cheekychappy1234
    @cheekychappy1234 6 месяцев назад

    Such a fantastic video! Keep producing more and don't be afraid to dive deeper and deeper.

  • @itaccount1993
    @itaccount1993 15 дней назад

    04:23 - запустил работу и не стал ее ожидать
    05:11 - у тебя не может быть параллельности без асинхронности, но может быть асинхронность без параллельности
    05:47 - пример с циклом от 0 до 1000
    11:26 - 2 вида Thread: foreground и background
    13:08 - в реальном ThreadPool не будет ограниченного числа Environment.ProcessorCount, это число изменяется (увеличивается или уменьшается)
    14:13;15:07 - execution context
    19:05 - определение execution context
    26:21 - Task это структура данных
    28:33 - Task in not only about operation its also interacting with that operation
    44:11 - Реализовав MyTask мы получили копию настоящего класса Task за исключением деталей перфоманса
    48:17 - Interlock why
    50:13 - why not use Thread.Sleep
    56:18 - в цикле работать не будет

  • @neeleshbodgal7479
    @neeleshbodgal7479 8 месяцев назад

    That helps to understand more and better about the Task API. Stephen Toub blogs are worth reading that always teach me something new 😀

  • @BryanKelly
    @BryanKelly 7 месяцев назад

    First, I loved this video. Just everything about it was good.
    I would love a follow up to cover:
    1. more of the async/await keywords (the stuff you were getting to at the very end)
    2. Why doing the "bad" things is bad. (ex. .Result, and others I'm failing to think of now)
    3. Async enumerable

  • @DotNetRyanYT
    @DotNetRyanYT 8 месяцев назад +1

    Thanks for this. Async/await was always a black box to me, but now I feel I have lifted the lid on the box and took a look inside.

  • @FXK23
    @FXK23 8 месяцев назад +1

    Definitely going to watch this again and code along. Excellent video!

  • @emiraksoy1520
    @emiraksoy1520 8 месяцев назад +1

    This was amazing we want more content with Steve 💯💯

  • @acedonk
    @acedonk 8 месяцев назад +9

    This was a masterclass, thanks!

  • @VukManic
    @VukManic 8 месяцев назад

    What an amazing video! This is one of best video to understand async await!!!! Thanks to both of you! Really enjoyed it!

  • @pachanga5382
    @pachanga5382 8 месяцев назад +1

    Excellent video-I was wondering at first why I needed to know this, and now I know!

  • @--Eric--
    @--Eric-- 8 месяцев назад

    Thanks Stephen and Scott, this was a great session. More please... 👏🏼

  • @mambocollective
    @mambocollective 7 месяцев назад

    Great video. Learnt so much from this. Definitely need more content like this, especially with Stephen. It worked so well with him leading the way and then you pulling him back with questions I had in my own head. Looking forward to more of this sort of content.🤩

  • @v001
    @v001 8 месяцев назад

    Stephen Toub is a legend! great talk, need more of this

  • @codewithkhondamir
    @codewithkhondamir 8 месяцев назад +2

    That’s amazing. Thanks Scott and Stephen.

  • @DOTNETMAN
    @DOTNETMAN 8 месяцев назад +4

    The Legends of .NET.

  • @papafe
    @papafe 7 месяцев назад +2

    Super interesting! I think it would be interesting also to dive deep into SynchronizationContext and how it relates to the ExecutionContext that was shown in the video

  • @teraformerr
    @teraformerr 2 месяца назад

    understood so many concepts thanks to this video, really really good stuff guys

  • @thedanielspindler
    @thedanielspindler 8 месяцев назад

    Loved this. Amazing! Now I just need to re-watch it another 5 times at 0.5 speed to really soak it all in.

  • @fifty6737
    @fifty6737 8 месяцев назад +2

    awesome video, always pleasure to listen to stephen

  • @KenRossPhotography
    @KenRossPhotography 8 месяцев назад

    Awesome video - so many great nuggets here. Even if you think you *know* async/await, you'll get value from watching this (maybe more than once) 🙂

  • @danielvillalba4457
    @danielvillalba4457 8 месяцев назад +1

    Wow, just amazing information and even better way to explain it! Thanks

  • @danfriedman7009
    @danfriedman7009 6 месяцев назад

    Immensely helpful. You guys rocked this presentation. Can't wait to watch the LINQ videos (and I hope there is more on the way).

  • @SharpGIS
    @SharpGIS 8 месяцев назад +1

    Loved this. Please do more Level 3-400 content!

  • @paaabl0.
    @paaabl0. 8 месяцев назад +1

    Brilliant demo! Thank you guys!

  • @northshorepx
    @northshorepx 7 месяцев назад

    That was a really great tutorial. Seeing how everything is continuations all the way down was incredibly eye opening. I'd love to see more details like this please. However I have one small nitpick, that of Stephen constantly making the font way too small to read. Scott kept picking him up on it, but it's really important for us who are watching to be able the read the code that they're writing and thus for presenters to realise how video tutorials need zoomed up fonts.

  • @sudeshryan8707
    @sudeshryan8707 8 месяцев назад +8

    This is gem of a tutorial. Thanks guys

  • @chenc671
    @chenc671 8 месяцев назад

    Wow, It was a Master piece when the await works at the end !

  • @stevanfreeborn
    @stevanfreeborn 8 месяцев назад +3

    Thank you for making this! 🙏🏻

  • @giovannimorleschi1750
    @giovannimorleschi1750 7 месяцев назад

    Awesom, semply awesom, you have to do a lot of this video please! Stephen Tuob, you are ten thousand time better then the better professor in tis solar system!

  • @paulecampbell
    @paulecampbell 8 месяцев назад +1

    Stephen is on another level!

  • @RickJohnn
    @RickJohnn 8 месяцев назад +1

    Excellent from start to finish.

  • @krccmsitp2884
    @krccmsitp2884 8 месяцев назад +1

    Amazing! Thanks to both of you! 🙂

  • @WalderFrey
    @WalderFrey 4 месяца назад

    Absolutely brilliant. Thanks lads.

  • @kRySt4LGaMeR
    @kRySt4LGaMeR 6 месяцев назад

    Watching Stephen doing this is amazing. Scott on the other hand has extremely lack luster contributions.

  • @ivandrofly
    @ivandrofly 5 месяцев назад

    16:22 - async local
    18:03 - ExecutionContext
    23:46 - ! and ? operator
    34:00 - locking to 'this'

  • @bendev333
    @bendev333 8 месяцев назад

    Loved this video, hope we will get more of these

  • @robl39
    @robl39 8 месяцев назад +4

    Now get David Fowler to write Kestrel from scratch. I’d love to see that.

  • @brechtlaitem
    @brechtlaitem 8 месяцев назад +4

    We want more, we want more!!

    • @dotnet
      @dotnet  8 месяцев назад +4

      We are making more right now!!!!!!!!!!!!!!!!

  • @tarun-hacker
    @tarun-hacker 8 месяцев назад +2

    Stephen Toub is awesome.

  • @sjark5000
    @sjark5000 6 месяцев назад

    This is just fantastic content, more of this please :)

  • @michaltomorowicz596
    @michaltomorowicz596 8 месяцев назад

    What a great material guys, massive kudos.

  • @jmbrjmbr2397
    @jmbrjmbr2397 6 месяцев назад

    Very interesting and enlightening lecture. Thank you for your efforts.

  • @MatteoGariglio
    @MatteoGariglio 7 месяцев назад

    I wish I watched this video long time ago 😅.
    Thank you so much Stephen, the explanations are really instructive.

  • @timeless-sg
    @timeless-sg 7 месяцев назад +2

    Did you see that "Hello, Scoot" at 51:28 ?

  • @boysen01
    @boysen01 7 месяцев назад +2

    Great video. But could have followed the premise of "looking at async/await before it was invented" even closer. So before a/a came to be, what issues did people have? Should have shown an example where you get problems due to not having async/await available. So in a setting where we do not have a/a available, we know that we need to code a thread pool? I mean, a lot of cool stuff shown here but a bit more "college-level" hand-holding would have been awesome and more in line with the premise from the intro

  • @unknown.artist.track3
    @unknown.artist.track3 7 месяцев назад

    I had already bookmarked your article from dev blog about async await)))

  • @jackkendall6420
    @jackkendall6420 8 месяцев назад +1

    This was incredibly good.

  • @obinnaokafor6252
    @obinnaokafor6252 8 месяцев назад +2

    Scott and Stephen should do videos on Tensor Primitives in dotnet. And other ML types and improvements in dotnet and C#

  • @CodeWithAnup
    @CodeWithAnup Месяц назад

    Thats wonderfull explanation. Really enjoyed it. Now I have better understanding how this magic happens under the hood.

  • @wolfgangdiemer2511
    @wolfgangdiemer2511 8 месяцев назад +2

    Thank you very much, awesome content

  • @Rolan18111
    @Rolan18111 7 месяцев назад

    Excellent video - that certainly removed a lof of the "ghosts in the machine" feel of async/await. I feel like de-implementing syntactic sugar would be another good video topic. Take some modern c# code and replace all the syntactic sugar with the underlying implementations. And/Or show how you can look up the underlying implementations quickly & easily.

  • @PhoenixCustomerInsights
    @PhoenixCustomerInsights 8 месяцев назад +2

    I would love to strive for that clarity of knowledge in tasks. I'm holding on to this video for another review and letting it wash over me a few times. Could there be a continuation in the parallel processing of tasks, comparing concurrency and parallel execution of Tasks?

  • @pylvr8021
    @pylvr8021 7 месяцев назад +1

    god damn it, this is a quality content

  • @nenadvicentic
    @nenadvicentic 6 месяцев назад +1

    Will there be a part two of `async/await`? It would be really nice to see how to implement `AsyncMethodBuilder`. Judging by the blog post "How Async/Await Really Works in C#", there is enough uncovered material for another full episode. 😅

  • @sachinvshishth
    @sachinvshishth 7 месяцев назад +1

    Thank you for the insightful session. Just a quick request: could you please utilize the dark theme whenever feasible?

  • @zakizaz1
    @zakizaz1 8 месяцев назад +4

    Great content . Thank you

  • @jimiscott
    @jimiscott 8 месяцев назад +4

    This is superb.

  • @sotsch9280
    @sotsch9280 7 месяцев назад +1

    So much more informative than the ordinary "information copy paste shit" out there :D thanks alot!

  • @santisq
    @santisq 4 месяца назад +1

    Amazing stuff! It kills me that Stephen doesn't use Dark Theme tho 😂

  • @GuildOfCalamity
    @GuildOfCalamity 8 месяцев назад

    Great tutorial. I would recommend balancing the mic levels next time before recording. Stephen's levels were much lower than Scott's.
    You guys should to do more of these "behind the curtain" tutorials.

  • @shadowspyes
    @shadowspyes 8 месяцев назад

    please more high detail low level videos like this!

  • @thishandleistaken
    @thishandleistaken 8 месяцев назад +1

    Amazing video! Thanks!