-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
async_hooks: eliminate require side effects #40782
async_hooks: eliminate require side effects #40782
Conversation
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.
LGTM.
Is this related to https://twitter.com/evanhlucas/status/1458192210382528518 ? |
I had a quick look because of that. As far as I can tell this shouldn't trigger that though. I just saw a thing in looking back at the code that could be improved. |
This comment has been minimized.
This comment has been minimized.
Does it make sense to add a test? |
Not sure how you'd even test it given that it's functionally identical other than just setting the trampoline function a little later and clearing it if the hooks are disabled. Do we have prior art on testing these environment fields? I guess it'd need to be a native test. In any case, I'll be travelling for the next week so I can either deal with that after I get back or we can land as-is. I'm good either way as it's not really any substantial/important change. |
PR-URL: nodejs#40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
15a34d4
to
689405c
Compare
Landed in 689405c |
PR-URL: #40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
PR-URL: #40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
PR-URL: #40782 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Just a minor improvement to avoid any unintended side effects to requiring async_hooks.
cc @nodejs/async_hooks