Advanced C#: 15 Async & Await

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ม.ค. 2025

ความคิดเห็น • 78

  • @juliancarax6415
    @juliancarax6415 9 ปีที่แล้ว +28

    Clear, NIce, Fast and Fun, really the best tutorials ever, thanks so much, It's like reading a 1000 pages book in a couple of hours.

    • @edtdk
      @edtdk 9 ปีที่แล้ว +1

      +Julian Carax I agree... So much information in such a short space of time. He is awesome.

  • @gavinbalajadia8697
    @gavinbalajadia8697 4 ปีที่แล้ว

    Clint Eastwood is the best C# tutorial video out there.

  • @MichaelSmitZA
    @MichaelSmitZA 7 ปีที่แล้ว

    Finally the penny dropped. To the point, clear and concise. Keep the tuts coming... Thanks!

  • @hyper-dicas
    @hyper-dicas 11 หลายเดือนก่อน

    Nice! After years, it still remains an excellent option for async await.

  • @WorldVibes
    @WorldVibes 5 ปีที่แล้ว +1

    This is just perfect! Thanks for putting this in such a clear and crisp manner.

  • @snooter28
    @snooter28 7 ปีที่แล้ว

    Wow, as a C# developer for a over a year professionally now, this is something I've honestly never used. It my line of work we just don't have many cpu heavy processing going on. However, in a personal project of my own I've run into this problem. From a developer's standpoint, this was clear, concise and very easy to follow. Bravo!

  • @drmcgeebox1
    @drmcgeebox1 7 ปีที่แล้ว

    Very well done, I have been a software engineer for over 35 years, and taught computer science at the university level. Just wanted to send you a shout-out for a well thought out and delivered tutorial.

  • @thearshiyan
    @thearshiyan 5 ปีที่แล้ว

    probably the best c# async await video

  • @manjeetnandal1
    @manjeetnandal1 5 ปีที่แล้ว

    You are Awesome Instructor!
    All always gives my All Votes to your nice Teaching-Pattern!
    Many useful!
    Great sharing!

  • @secretsquirrel5566
    @secretsquirrel5566 7 ปีที่แล้ว

    This was a very instructive and easy to understand tutorial. Thank you Mr. Eastwood.

  • @Tall-Cool-Drink
    @Tall-Cool-Drink 7 ปีที่แล้ว +3

    Great video. It cleared up for me the difference between using Task and Async/Await.
    thank you.

  • @birdost4872
    @birdost4872 4 ปีที่แล้ว

    best async,await video so far

  • @Dremekeks
    @Dremekeks 5 ปีที่แล้ว

    This tutorial set has been amazing.. god.. I've learned so much. This all will come in useful, especially asynchronous logic and lambda expressions! I watched this series at x1.5 speed, mind you; but it's been amazing. Can't wait to bring this to the world.

  • @jarmadax
    @jarmadax 8 ปีที่แล้ว +1

    Thank you for this series of videos, very clearly explained!

  • @ga7853
    @ga7853 5 ปีที่แล้ว

    Thanks a million, you have solved some of my problems of understanding Async - Await.. Thanks again.

  • @tangrui1992
    @tangrui1992 6 ปีที่แล้ว

    LOTS OF THANKS TO YOUR AWESOME VIDEOS!!!

  • @lyozov974
    @lyozov974 7 ปีที่แล้ว

    Haters gonna hate, but this is awesome tutorial.I rarely watch anything above 10 minutes lately, but this was mesmerizing!

  • @mats8658
    @mats8658 8 ปีที่แล้ว +4

    Thanks, i've learned a lot with this course, and i'll definetly put everything to use! XD

  • @matiu7276
    @matiu7276 6 ปีที่แล้ว

    Really thanks, you are explaining it very clearly, now i feel much more advanced programmer :)

  • @leandrofagundes3081
    @leandrofagundes3081 10 ปีที่แล้ว +3

    Hey man, amazing videos! I really loved the way you speak (dinamically) and the content. Just an idea... put in the comments, a link for the previous and next lessons. I came here looking for async but you talk about the "task stuff" and it got my attention, so I should search for the previous lesson. And there you talked about other lessons too, so, a navigation in video descriptions can help a lot! :D keep doing that man, and thanks for the videos

  • @_Mikekkk
    @_Mikekkk 3 ปีที่แล้ว

    We need more such nice tutorials.

  • @shanic6337
    @shanic6337 8 ปีที่แล้ว +1

    Great video and tutorial!
    It looks so simple now :)

  • @sun_raise_ap
    @sun_raise_ap 5 ปีที่แล้ว

    Nice.. thanks for teaching async await 🏇🏇🏇

  • @mikoo1991
    @mikoo1991 7 ปีที่แล้ว

    None of my teachers explained so clearly as you.! :D

  • @Jodyrock11_jdr
    @Jodyrock11_jdr 10 ปีที่แล้ว

    Great job Clint thank you very much!

  • @mikegagnon1
    @mikegagnon1 10 ปีที่แล้ว

    Awesome. Thank you!

  • @patrickdenino1503
    @patrickdenino1503 7 ปีที่แล้ว +2

    Cheers, good video.

  • @naserintegral
    @naserintegral 10 ปีที่แล้ว +1

    Thank you for your video

  • @Aryan91191
    @Aryan91191 10 ปีที่แล้ว +11

    Could you explain the need to write a wrapper? I think you could have simply changed the available function to
    Private async void BigLongImportantMethodAsync(string name)

    • @thatKurtis
      @thatKurtis 6 ปีที่แล้ว

      Maybe to split it up into smaller chunks to make it more understandable?

    • @unknownsoul7043
      @unknownsoul7043 5 ปีที่แล้ว

      microsoft warn against writing async void....

  • @eduardrivas6964
    @eduardrivas6964 7 ปีที่แล้ว

    Incredible... thanks a lot.

  • @yugeshkc851
    @yugeshkc851 9 ปีที่แล้ว

    could u plz provide me link about other viedos

  • @Dpaz2009
    @Dpaz2009 10 ปีที่แล้ว

    Thank you guy! You are awesome!

  • @Binarymath
    @Binarymath 5 ปีที่แล้ว

    Thank you so much for your excellent video.

  • @swoogan
    @swoogan 9 ปีที่แล้ว +4

    I like the presentation, but the final solution feels a little convoluted. I understand that the idea is that the BigLongImportantMethod exists and you're trying to wrap it without modifying it. However, you could use the following:
    private async void button1_Click(object sender, EventArgs e)
    {
    label1.Text = "waiting...";
    label1.Text = await Task.Run(() => BigLongImportantMethod("Andrew"));
    }
    Just mark the click handler as async. Lastly, I think it would have been good to touch on asynchronous I/O. Otherwise, nice work.

    • @tombby11
      @tombby11 9 ปีที่แล้ว

      Colin Svingen You have a point here , but i guess for beginners like myself I would prefer the breaking down method for more understanding and then we can make things shorter :)

  • @45Lotos
    @45Lotos 7 ปีที่แล้ว

    What are the advantages of this over using a backgroundworker object?

  • @thesloable
    @thesloable 8 ปีที่แล้ว

    Very clear explanation. Subscribed

  • @KhalidAfridi1
    @KhalidAfridi1 5 ปีที่แล้ว

    Awesome. thank you so much

  • @TheAstroguypasa
    @TheAstroguypasa 8 ปีที่แล้ว

    Very awesome tutorial

  • @mhmdnayef710
    @mhmdnayef710 7 ปีที่แล้ว

    you are beast ..... thnx 2 u

  • @khaledsaleh286
    @khaledsaleh286 9 ปีที่แล้ว

    Thank you very much for sharing! :)

  • @AbuAliMuhammadSharjeel
    @AbuAliMuhammadSharjeel 7 ปีที่แล้ว

    Greeaaaat!

  • @mattli911
    @mattli911 6 ปีที่แล้ว

    For some reason, when I do what you have at the end of the Video, my UI is still locked up/not running in the BG, and I cannot change other UI elements on the Main Thread, I believe, like showing an Animated Loading Icon. The Icon never shows, since it's all locked up from this Async stuff, or which SHOULD be Async but isn't... Maybe something else is going on in the BG that's locking up the main UI.

    • @mattli911
      @mattli911 6 ปีที่แล้ว

      I got it to work, by using a workaround, but still using these methods, if even matters. I had to use a Push Frame Event/Method, to Update the UI. I do this a fraction of the time, in the Loop. So its not killing the Load Perf, and still gives some indication of progress.
      public object ExitFrame(object f)
      {
      ((DispatcherFrame)f).Continue = false;
      return null;
      }
      public void DoEvents()
      {
      DispatcherFrame frame = new DispatcherFrame();
      Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
      new DispatcherOperationCallback(ExitFrame), frame);
      Dispatcher.PushFrame(frame);
      }
      Then in my Loop I can call like,
      if (pushEventCounter >= imgPaths.Count() / 6) //Push Update to UI every so often, so doesn't slow it down, and shows progress to user...
      {
      this.Dispatcher.Invoke((Action)delegate
      {
      progressBar1.Value = (progressCounter * 100) / imgPaths.Count();
      itemsCount.Text = (progressCounter.ToString() + " Items");
      progressCounterBlck.Text = (progressCounter.ToString() + "/" + imgPaths.Count().ToString());
      });
      DoEvents();
      pushEventCounter = 0;
      }

  • @xanmichael
    @xanmichael 7 ปีที่แล้ว

    thanks man!
    works great!

  • @MercedeX7
    @MercedeX7 10 ปีที่แล้ว

    Excellent lessons, I learn a lot.How do you plan a lesson with these easy to understand examples? Do you follow certain books or blogs?

  • @crawshaws1234
    @crawshaws1234 8 ปีที่แล้ว

    I was under the impression that just writing a "wrapper" method that calls Task.Start was not the correct way to do things as the original code it is wrapping is not intended to run synchronously.

  • @TraxxStudios
    @TraxxStudios 9 ปีที่แล้ว

    Good stuff

  • @augsongeorge5561
    @augsongeorge5561 9 ปีที่แล้ว

    It is clear and Nice.Thank You...

  • @vboilay
    @vboilay 9 ปีที่แล้ว

    Just gr8. thx.

  • @bittikettu
    @bittikettu 9 ปีที่แล้ว +3

    This tutorial was awesome. I was having some problems with my app where barcodes were sent via RESTful API to a server and the reading interval is quite fast and there were no time to wait for response. With these tutorials I was able to make robust application which could handle masses of request to server parallel. I previously had a List of threads basically which I polled in a timer. It was quite ok, because it manipulated the UI-components in UI thread. TaskScheduler was the missing link with more OO approach. THANK YOU! All I have to do is this: warehouse.UploadProduct3(Product_REGEXP.Groups[1].ToString(),dg_log);

  • @CoderRiderMofi
    @CoderRiderMofi 8 ปีที่แล้ว

    Very nice..but I'm doing all these stuff with threads...Now i think i need to switch to task

  • @769270865
    @769270865 7 ปีที่แล้ว

    The question is: But can it be easily be used in Unity3D?

  • @Hi_Tech
    @Hi_Tech 9 ปีที่แล้ว +1

    FYI, the person uploading these videos doesn't actually own the videos.

    • @systemvoid287
      @systemvoid287 9 ปีที่แล้ว

      +Tech Tadashii-Ching No shit.

    • @Hi_Tech
      @Hi_Tech 9 ปีที่แล้ว +2

      +System Void You would think that statement was a no shit statement but if you read the other comments... It's not so obvious for some.

  • @gastos7771
    @gastos7771 9 ปีที่แล้ว

    Hi,
    Isn't this defeats the purpose of asynchronous/threading programming using Task because you're using AWAIT, then everything beyond that line of code (...StartNew...) will not run?
    If you want to run your code via threading, why use AWAIT then? Sorry this kinda lost me there.

  • @gerryscat
    @gerryscat 7 ปีที่แล้ว

    Very nice. Would be nice to run at x1.25 speed, some parts use a lot of works for some pretty simple stuff, but nicely explained regardless.

  • @hammerain93
    @hammerain93 7 ปีที่แล้ว

    I don't understand why you need the await keyword to tell the code to "once the execution reaches this line, I cannot continue beyond this line until the task has completed." Isn't that how every single line of code behaves? One line completes, then the next line, etc.

    • @bombames
      @bombames 7 ปีที่แล้ว

      From what I read here, right after the note,
      docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/await
      it seems like what it does is takes the lines it's on / it gets and executes them inside a thread, but the lines after it don't execute until after the thread is done.
      I'm probably wrong about that, but if I'm right, I'd think the actual important line would be async, but everywhere I look they say it doesn't do anything except tell the compiler that there might be an await somewhere.
      It's really weird, I hope someone explains this.

  • @ChiragRajputS
    @ChiragRajputS 5 ปีที่แล้ว

    You could use this.Dispatcher.Invoke() to overcome thread affinity

  • @calvinnel3954
    @calvinnel3954 8 ปีที่แล้ว

    could someone fet this are you not confucing two concepts 1 Task.Factory (threads) and 2 await async. in other word you could of done this with out Task.Factory

  • @joeycopperson
    @joeycopperson 4 ปีที่แล้ว

    Thanx nice lesson

  • @ahmedsafan86
    @ahmedsafan86 8 ปีที่แล้ว

    Thanks.

  • @Ziplock9000
    @Ziplock9000 7 ปีที่แล้ว +1

    The syntax is still too long-winded for me

  • @wongjunnkit4503
    @wongjunnkit4503 8 ปีที่แล้ว +2

    seems powerful, but the code looks dirty.

  • @surangaupul
    @surangaupul 9 ปีที่แล้ว

    Thank you sir

  • @mhovmark
    @mhovmark 5 ปีที่แล้ว

  • @MakubexIsVik
    @MakubexIsVik 7 ปีที่แล้ว

    Can skip the first 10 min

  • @martinvandrunen8810
    @martinvandrunen8810 6 ปีที่แล้ว

    Async should neve be void.

  • @rahulkamdi44
    @rahulkamdi44 5 ปีที่แล้ว

    Kindly create your content independent of other video as you are restricting the audience to either fresher or students. But there are multiple people who just want to get some concept clear for them it's hard to understand