-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: context loss when awaiting a thenable #27599
Comments
AFAIK there has never been support for thenables and thus I marked this as feature request. |
Seems to me like a requirement for |
Adding |
Yes, this is the same issue as I observed in #26064. |
Duplicate of #26064 |
Yes, this appears to be a duplicate. I do still think this needs to be brought up in the diagnostics meeting though to figure out how to proceed. The |
It seems
async_hooks
is losing context, in certain cases, when awaiting a thenable. This appears to occur in all major versions of Node.js withasync_hooks
available. See the code example and output for reference.Within the
then
function on the thenable object, the trigger id is 0. Note that this does not happen when awaiting a thenable as the first await within an async function.cc @nodejs/diagnostics
Code example
Output
The text was updated successfully, but these errors were encountered: