Skip to content

isolates and event Loops

https://www.youtube.com/watch?v=vl_AaCgudcY

Today (05/03/2024), is my second day watching this video. I realize now this diagram is an accurate and neat way to visualize an isolate:

1741033102.png

to

1741033113.png

The animations of that diagram makes a lot of sense too. You see those green blocks that light up or switch off, they're representing the memory that's allocated to the isolate.

And the arrows that circle around one another is the event loop (obviously). The event loop, that runs also has its own thread.

Crucial point is that ALL dart code run in an isolate.

"In dart, each thread is in its own isolate, with its own memory and it just processes events."

Update: 06/03/2024

00:34: "What makes asynchrony possible in dart? Isolates" 02:17: "What really makes async code possible: the Event Loop"

"All of the high level APIs that we're used to for asynchronous programming: Futures, Streams, async and await, they're all built on and around this simple loop."

1741033138.png

Update: 07/03/2024

Isolate example used in the video:

1741033156.png


Comments