-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Why the difference in the async_hooks output? #17027
Comments
i think this issue was meant for https://github.com/lrlna/on-async-hook |
I could simply use that code here and reproduce the issue.
All that lib does is hook to the init and destroy events. Then there is
some time computations from within them. Thats it.
…On 15-Nov-2017 1:01 AM, "Gus Caplan" ***@***.***> wrote:
i think this issue was meant for https://github.com/lrlna/on-async-hook
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17027 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAZWaNLga5iRa4UsNZjV0Iz59tA05X23ks5s2eqhgaJpZM4Qd3ML>
.
|
my bad, i misread the issue |
@deostroll running this trace by using pure node core code https://gist.github.com/refack/e6d36a77cef460ca53b4e1ed58822434 PROMISE(6): trigger: 1 execution: 1
Timeout(7): trigger: 1 execution: 1
TIMERWRAP(8): trigger: 1 execution: 1
PROMISE(9): trigger: 6 execution: 1
before: 8
before: 7
done
TickObject(10): trigger: 7 execution: 7
promiseResolve: 6
after: 7
after: 8
before: 10
after: 10
before: 9
FSREQWRAP(11): trigger: 9 execution: 9
promiseResolve: 9
after: 9
destroy: 7
destroy: 10
destroy: 8
before: 11
FSREQWRAP(12): trigger: 11 execution: 11
after: 11
destroy: 11
before: 12
FSREQWRAP(13): trigger: 12 execution: 12
after: 12
destroy: 12
before: 13
finished
TickObject(14): trigger: 13 execution: 13
after: 13
before: 14
after: 14
destroy: 14
destroy: 13 You will notice that the context with ID 9 doesn't get
So AFAICT it is a bug in |
Using node 9.1.0 on ubuntu 16.04
Cooked up a small example implementing async hooks api:
This gives output as follows:
Example 2:
output:
Why the the second example not invoke the hooks for the file system write?
the on-async-hook library simply registers to the init and destroy events of the async hooks lifecycle.
The text was updated successfully, but these errors were encountered: