---
title: "Discussion on \"Tidbit 01: How Does Event Loop Handle Promises? Ever Thought?\" | Hashnode"
description: "Discussion on \"Tidbit 01: How Does Event Loop Handle Promises? Ever Thought?\". Learn how the promises are handled internally using event loop. This concept is essentials to debug and work with async programming."
url: "https://hashnode.com/posts/how-does-event-loop-handle-promises-ever-thought/68480b9fb9cb417f4415e5e0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Tidbit 01: How Does Event Loop Handle Promises? Ever Thought?](https://blog.greenroots.info/how-does-event-loop-handle-promises-ever-thought?utm_source=hashnode&utm_medium=feed)

Learn how the promises are handled internally using event loop. This concept is essentials to debug and work with async programming.

Jun 10, 2025 · 2 min read · blog.greenroots.info  
Updated Jun 19, 2025  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Tapas Adhikary](https://hashnode.com/@atapas)

@atapas · Bangalore

  
[View profile](https://hashnode.com/@atapas)

Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source

Co-Founder, @CreoWis | Teacher, @tapaScript | Founder, @ReactPlay | YouTuber | Writer | Human

## Responses 2

Markdown supported · ⌘↵ to post

[George Blue](https://hashnode.com/@georgeblue)

[Oct 6](https://hashnode.com/posts/how-does-event-loop-handle-promises-ever-thought/68480b9fb9cb417f4415e5e0/comment/6ac54c271b24e2ca80bba0d1)

Really clear explanation of why promise callbacks jump ahead of setTimeout even with a zero delay. The step-by-step walkthrough of the microtask queue draining before the next macrotask finally made the ordering click for me. I'll keep this one bookmarked for the next time an async bug has me confused.

[max](https://hashnode.com/@maxxmini)

[Apr 3](https://hashnode.com/posts/how-does-event-loop-handle-promises-ever-thought/68480b9fb9cb417f4415e5e0/comment/69cf5141845022635fc621a1)

This microtask vs macrotask priority is something I ran into the hard way building an async agent orchestration system on Node.js. I had a chain of Promise.resolve() callbacks coordinating sub-processes, and a setTimeout(0) health check that kept getting starved because the microtask queue never fully drained between cycles.

Ended up refactoring the health checks to use setImmediate() on the I/O callback phase instead, which gave them a more predictable slot in the loop.

One thing I am curious about — have you noticed any practical difference in how queueMicrotask() behaves vs Promise.resolve().then() in terms of ordering? In theory they both hit the microtask queue, but I have seen some edge cases with nested microtasks where the scheduling felt slightly different.
