Andrey Pechkurov
1 min readJan 1, 2019

--

Glad that you liked the article. Thanks for the feedback!

As for the zero-cost async stack traces in V8 (the one that is available with — — async-stack-traces flag), it’s a completely different feature. It provides much more precise stack traces for any errors that are happening in async/await call chains. So this is an out-of-the-box feature and it doesn’t assume any API for developers.

On the other hand, Async Hooks is not directly related with async/await or error handling and provides a general purpose, flexible API for dealing with any async calls. As for the footprint, Async Hooks are definitely not zero-cost (yet it’s not super-heavy), as resources and contexts need to be tracked, and listenters need to be called.

--

--

Andrey Pechkurov
Andrey Pechkurov

Written by Andrey Pechkurov

Core database engineer at QuestDB. Distributed systems gazer. Node.js contributor. Occasional tech blogger and speaker.

Responses (1)