Это видео недоступно.
Сожалеем об этом.
#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-...
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
Hands down the best event loop explanation you'll find anywhere for any language. Keep it up!
Thank you so much, I really appreciate it!
I took your course on Udemy, without a doubt the best course I've ever taken on Dart!
The best explanation on isolates and event loops. Thank you so much man. Take love
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 🤞
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...
Thank you so much! ✨ 🥂
7K subs... Underrated channel
Haha, thank you so much, well, consistency is the key, hopefully the channel will get a little bit more popular in the future
Michael who cleans the box made me laugh :D
Mr. Flutterly, you are a well known genius!
Thank you, Bobby! I really appreciate it!
It was amazing... This video cleared all of my confusions.
thank your for this awesome imformation :)
thx man, cool job
Bro You are next level.
Good job 👍👍👍
Thanks
Thank you sir.
You're welcome, doc! ✨
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.
Wow nice sir
Thank you so much!
I'm using isolate in my app for heavy calculation. Waiting for isolate groups to be stable, too!
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! ✨
What there was a micratask? Thanks man!
good :)
Thank you! Cheers!
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.
Hello sir! Please make a video about flutter In-app purchases on both android and IOS. Thanks, sir!
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.
yeah. i was thinking the same.
Im going to start calling every garbage collector Michael now!
nice joke Michael xD
Why can't I give more than 1 like?
How many lectures for dart sir left
About 3 to 5 probably