Great article Michael. After reading this and a few of those further reading link, I actually think I understand at least the way Node’s event loop works.
The Void Canvas link was particularly helpful and (for me at least) made things clearer by pointing out that:
Actually both process.nextTick() and setImmediate() was named wrongly. If we swap the names of those then the names will match the functionality.
As soon as I read that, I could better read the event loop graphic and see how process.nextTick()
could very easily block things, and how setImmediate()
related more to an immediate function run after an IO event, whereas setTimeout()
was more appropriate “in the loop” per se.
Does that make sense?