600 Seconds on async_hooks
summary
Covers Node.js async_hooks API: its callbacks (init, before, after, destroy, promiseResolve), provided identifiers (id, type, triggerAsyncId) and raw resource objects for tracking async work lifetime and parentage. Describes pitfalls (id reuse, keeping references that prevent destroy and GC delays, console/logging causing recursive async events) and practical uses such as precise logging, hung-promise detection, timing, and building continuation-local-storage–like functionality.
AI-written summary · about
chapters (9)
- 0:00async_hooks in Node.js
- 1:05Async issues in JS
- 2:31Evolution of async_hooks
- 3:56What async_hooks are
- 5:21How async_hooks work
- 6:46async_hooks pitfalls
- 8:36GC and implementation
- 10:27Practical uses
- 11:52Conclusion & Q&A








