Microtasks vs Events and how to determine what exactly?

I read through understanding the dart event loop on my website:

https://www.dartlang.org/articles/event-loop

but I seem confused. I understand the order of the main elements, then the micro, and then the events, but where I got confused is really a practical implementation.

What would Microtask really define in contrast to Event, and is it possible to change them?

enter image description here

Having looked at this diagram, as well as at some examples showing the order execution order, I was curious what makes them unique? It seems that both can be blocks of code, but the difference is the level of importance ... sort of like: Normal, Advanced and Critical ..

, , , , , , , (, - , , ).

- , .

+4
2

. , . , , . - - , .

: , , ( ), , , .

: . - , Dart, . DOM , . , , , .

(, ), . , - - . .

, , , , (, ), , .

main , .

+4

- . , async, , . , , - . main , .

A , , @lrn - .

+2

Source: https://habr.com/ru/post/1623995/


All Articles