Это видео недоступно.
Сожалеем об этом.

#20 - Dart Isolates, Threads, The Event Loop, Microtasks, Synchronous & Asynchronous workflows

Поделиться
HTML-код
  • Опубликовано: 7 сен 2021
  • Hi there!
    In this really detailed video I'll show you how Dart processes synchronous and asynchronous events on a single thread, while also discussing all of the particularities of a Dart Isolate, including the main thread of execution, the event loop, event & microtask queue, memory and many many more. You definitely need to know all of the information covered in this tutorial in order to understand synchronous and asynchronous workflows.
    All animations were done in VideoScribe, you can try it by clicking my affiliate link --- www.awin1.com/cread.php?awinm...
    You can contact me directly here:
    Join my Discord Server --- / discord
    Twitter --- / letsgetwckd
    Instagram --- / letsgetwckd
    Also, if you want to support me furthermore you can become an RUclips Member, donate or buy my courses on Udemy, using the following links:
    Buy me a Ko-fi & Become a member! --- ko-fi.com/letsgetwckd
    Become an Official RUclips Member! ---- / flutterly
    Buy my Udemy Courses! ---- www.udemy.com/user/tiberiu-po...
    Support me on Revolut! ---- revolut.me/letsgetwckd
    Donate me on Paypal! --- www.paypal.me/letsgetwckd
    Support me on Patreon! --- / wckdyt Dart - from Novice to Expert
    Source Code --- github.com/TheWCKD/Dart-from-...

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

  • @Flutterly
    @Flutterly  2 года назад +1

    My Complete Dart Course is now live on Udemy! Go get it while it's hot!
    Oh, and as a gift to my community, here's a limited-time coupon (LETSGETWCKD) helping you get it with as little as 9.99$.
    It's a steal for the amount of work I put in.
    www.udemy.com/course/dart-from-novice-to-expert/?referralCode=EC9CB6CC14FFA62C901B

  • @faidonc.kourounakis4528
    @faidonc.kourounakis4528 2 года назад +17

    Hands down the best event loop explanation you'll find anywhere for any language. Keep it up!

    • @Flutterly
      @Flutterly  2 года назад

      Thank you so much, I really appreciate it!

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

    I took your course on Udemy, without a doubt the best course I've ever taken on Dart!

  • @inanmahmud9336
    @inanmahmud9336 2 года назад +2

    The best explanation on isolates and event loops. Thank you so much man. Take love

  • @widelx1259
    @widelx1259 10 месяцев назад

    Sometimes I already know the principles and follow quite good. But I won't skip the video because there is so much depth in it : that helps me understand the "overall framework"
    Thanks a lot 🤞

  • @ashishranjan4298
    @ashishranjan4298 2 года назад +7

    great work ,,,,the way u present your videos I don't think anyone does that. easily understandable ..the most important thing ..that i enjoy
    watching your videos....already purchased your Udemy course...hope you add more courses...

    • @Flutterly
      @Flutterly  2 года назад

      Thank you so much! ✨ 🥂

  • @ir2001
    @ir2001 2 года назад +1

    7K subs... Underrated channel

    • @Flutterly
      @Flutterly  2 года назад +1

      Haha, thank you so much, well, consistency is the key, hopefully the channel will get a little bit more popular in the future

  • @jasnamitrovic1650
    @jasnamitrovic1650 2 года назад +1

    Michael who cleans the box made me laugh :D

  • @bobby9568
    @bobby9568 2 года назад +1

    Mr. Flutterly, you are a well known genius!

    • @Flutterly
      @Flutterly  2 года назад +1

      Thank you, Bobby! I really appreciate it!

  • @muhammadabdulbasit8781
    @muhammadabdulbasit8781 2 года назад

    It was amazing... This video cleared all of my confusions.

  • @erasmo-programacion2839
    @erasmo-programacion2839 2 года назад

    thank your for this awesome imformation :)

  • @stopwaruauaua
    @stopwaruauaua 2 года назад

    thx man, cool job

  • @mateenmehmood5675
    @mateenmehmood5675 2 года назад

    Bro You are next level.

  • @ibrohimxodjayev6158
    @ibrohimxodjayev6158 2 года назад

    Good job 👍👍👍

  • @gayratbeshimov9533
    @gayratbeshimov9533 2 года назад +1

    Thanks

  • @md.ruhulamin7963
    @md.ruhulamin7963 2 года назад +1

    Thank you sir.

    • @Flutterly
      @Flutterly  2 года назад

      You're welcome, doc! ✨

  • @prabinlamsal74
    @prabinlamsal74 11 месяцев назад +1

    Basically, so dart has one event loop for event handling that runs in an isolate. It also has other threads like the helper thread for GC. When normal expressions come, the dart just processes what's on the event queue and moves forward. When a future appears, it puts it in the call stack waiting for the future. Then it continues with the other tasks. It keeps on doing the same for all the futures. If one of the futures is a microtask, then it will be thrown into the microtask queue and will get executed before the other normal futures.
    We can spawn multiple isolates for achieving multithreading but each isolate comes with its own memory space and will not be quite efficient if we keep on spawning those. Isolate groups are more efficient because we can spawn multiple isolates sharing a same memory space and use those isolates to achieve parallalism.
    Is my understanding correct?
    Also, the things that I don't understand about asynchronous programming in dart are as follows:
    - If i use await keyword to await for a function result that RETURNS a FUTURE, the execution below the await keyword is also paused.
    - If i use await keyword to await for a function that just RETURNS a VOID and just does Future.delayed( ....print stuffs..... ) , then the lines below the await will not wait for its execution.
    I am not sure how it works behind the scenes and can't find materials that can make me understand.

  • @AyushPanditofficial
    @AyushPanditofficial 2 года назад +1

    Wow nice sir

  • @j7GpqfK2
    @j7GpqfK2 2 года назад +1

    I'm using isolate in my app for heavy calculation. Waiting for isolate groups to be stable, too!

    • @Flutterly
      @Flutterly  2 года назад

      Great to hear that, Yun-Cheng! I'm eagerly waiting for them to get stable too, it's going to be such a performance upgrade for both Dart and Flutter workflows! ✨

  • @YTarikKalyoncu
    @YTarikKalyoncu 2 года назад +1

    What there was a micratask? Thanks man!

  • @diginthomas3093
    @diginthomas3093 2 года назад +1

    good :)

  • @omidid
    @omidid 2 года назад

    Dart remembers me VB6 but in a modern way. In VB6 to avoid blocking the UI thread, you need to call DoEvents. For me the way Dart handles tasks in a single thread remember me the same thing.

  • @TheThornTech
    @TheThornTech 2 года назад

    Hello sir! Please make a video about flutter In-app purchases on both android and IOS. Thanks, sir!

  • @ChumX100
    @ChumX100 2 года назад +1

    I don't think the order of events in the exercises is guaranteed to be the one shown, as the order of processing depends on the time each future takes to be fulfilled. For the results shown to be correct, it must be assumed that futures are fulfilled in the order that they were declared, which may or may not be the case.

    • @prabinlamsal74
      @prabinlamsal74 11 месяцев назад

      yeah. i was thinking the same.

  • @pedrobotsaris2036
    @pedrobotsaris2036 Год назад +1

    Im going to start calling every garbage collector Michael now!

  • @bobby9568
    @bobby9568 2 года назад +1

    Why can't I give more than 1 like?

  • @AyushPanditofficial
    @AyushPanditofficial 2 года назад +1

    How many lectures for dart sir left

    • @Flutterly
      @Flutterly  2 года назад

      About 3 to 5 probably