-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add entry for AsyncHook
class
#31865
Conversation
doc/api/async_hooks.md
Outdated
|
||
The class `AsyncHook` exposes interface for tracking lifetime events | ||
of asynchronous operations. Using a unique ID per asynchronous call, | ||
it helps associating method calls that otherwise do not appear together |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either
it helps associating method calls that otherwise do not appear together | |
it helps with associating method calls that otherwise do not appear together |
or
it helps associating method calls that otherwise do not appear together | |
it helps associate method calls that otherwise do not appear together |
That being said – what’s a typical call stack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@addaleax , I used typical
here to mean a representative call stack on node.js program error. As per my understanding, a representative stack is a incomplete part of an asynchronous sequence. Am I wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HarshithaKP I’m still confused… That kind of only moves the question from “what’s a typical call stack?” to “what’s a representative call stack?”.
To be honest, I think it’s okay to drop the second sentence here. The sentence is not accurate anyway, the IDs are unique per asynchronous resource but not per asynchronous call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@addaleax, dropped the second sentence.
@nodejs/documentation (I'm feeling @vsemozhetbyt's absence these days. ❤️) |
90da144
to
410b6e6
Compare
fixes: #31661 PR-URL: #31865 Fixes: #31661 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in e4a72d6 |
fixes: #31661 PR-URL: #31865 Fixes: #31661 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
fixes: #31661 PR-URL: #31865 Fixes: #31661 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
fixes: #31661
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes