Advanced C#: 15 Async & Await

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

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

  • @gavinbalajadia8697
    @gavinbalajadia8697 3 года назад

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

  • @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.

  • @hyper-dicas
    @hyper-dicas 9 месяцев назад

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

  • @MichaelSmitZA
    @MichaelSmitZA 7 лет назад

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

  • @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!

  • @manjeetnandal1
    @manjeetnandal1 5 лет назад

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

  • @WorldVibes
    @WorldVibes 5 лет назад +1

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

  • @secretsquirrel5566
    @secretsquirrel5566 7 лет назад

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

  • @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

  • @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.

  • @sun_raise_ap
    @sun_raise_ap 5 лет назад

    Nice.. thanks for teaching async await 🏇🏇🏇

  • @lyozov974
    @lyozov974 7 лет назад

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

  • @birdost4872
    @birdost4872 4 года назад

    best async,await video so far

  • @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 :)

  • @ga7853
    @ga7853 4 года назад

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

  • @jarmadax
    @jarmadax 8 лет назад +1

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

  • @_Mikekkk
    @_Mikekkk 3 года назад

    We need more such nice tutorials.

  • @mats8658
    @mats8658 8 лет назад +4

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

  • @tangrui1992
    @tangrui1992 6 лет назад

    LOTS OF THANKS TO YOUR AWESOME VIDEOS!!!

  • @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.

  • @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

  • @shanic6337
    @shanic6337 8 лет назад +1

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

  • @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 4 года назад

      microsoft warn against writing async void....

  • @mikoo1991
    @mikoo1991 7 лет назад

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

  • @KhalidAfridi1
    @KhalidAfridi1 5 лет назад

    Awesome. thank you so much

  • @Binarymath
    @Binarymath 5 лет назад

    Thank you so much for your excellent video.

  • @mikegagnon1
    @mikegagnon1 9 лет назад

    Awesome. Thank you!

  • @Jodyrock11_jdr
    @Jodyrock11_jdr 10 лет назад

    Great job Clint thank you very much!

  • @eduardrivas6964
    @eduardrivas6964 7 лет назад

    Incredible... thanks a lot.

  • @MercedeX7
    @MercedeX7 9 лет назад

    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?

  • @TheAstroguypasa
    @TheAstroguypasa 7 лет назад

    Very awesome tutorial

  • @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);

  • @naserintegral
    @naserintegral 9 лет назад +1

    Thank you for your video

  • @Hi_Tech
    @Hi_Tech 9 лет назад +1

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

    • @systemvoid287
      @systemvoid287 8 лет назад

      +Tech Tadashii-Ching No shit.

    • @Hi_Tech
      @Hi_Tech 8 лет назад +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.

  • @thesloable
    @thesloable 8 лет назад

    Very clear explanation. Subscribed

  • @augsongeorge5561
    @augsongeorge5561 8 лет назад

    It is clear and Nice.Thank You...

  • @patrickdenino1503
    @patrickdenino1503 6 лет назад +2

    Cheers, good video.

  • @gerryscat
    @gerryscat 6 лет назад

    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.

  • @Dpaz2009
    @Dpaz2009 9 лет назад

    Thank you guy! You are awesome!

  • @joeycopperson
    @joeycopperson 3 года назад

    Thanx nice lesson

  • @khaledsaleh286
    @khaledsaleh286 8 лет назад

    Thank you very much for sharing! :)

  • @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.

  • @45Lotos
    @45Lotos 7 лет назад

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

  • @mhmdnayef710
    @mhmdnayef710 7 лет назад

    you are beast ..... thnx 2 u

  • @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;
      }

  • @yugeshkc851
    @yugeshkc851 9 лет назад

    could u plz provide me link about other viedos

  • @wongjunnkit4503
    @wongjunnkit4503 8 лет назад +2

    seems powerful, but the code looks dirty.

  • @769270865
    @769270865 6 лет назад

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

  • @xanmichael
    @xanmichael 7 лет назад

    thanks man!
    works great!

  • @vboilay
    @vboilay 9 лет назад

    Just gr8. thx.

  • @TraxxStudios
    @TraxxStudios 9 лет назад

    Good stuff

  • @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.

  • @ChiragRajputS
    @ChiragRajputS 5 лет назад

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

  • @CoderRiderMofi
    @CoderRiderMofi 8 лет назад

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

  • @ahmedsafan86
    @ahmedsafan86 8 лет назад

    Thanks.

  • @AbuAliMuhammadSharjeel
    @AbuAliMuhammadSharjeel 7 лет назад

    Greeaaaat!

  • @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.

  • @Ziplock9000
    @Ziplock9000 7 лет назад +1

    The syntax is still too long-winded for me

  • @calvinnel3954
    @calvinnel3954 7 лет назад

    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

  • @surangaupul
    @surangaupul 8 лет назад

    Thank you sir

  • @mhovmark
    @mhovmark 5 лет назад

  • @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

  • @MakubexIsVik
    @MakubexIsVik 7 лет назад

    Can skip the first 10 min

  • @martinvandrunen8810
    @martinvandrunen8810 6 лет назад

    Async should neve be void.