| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM, we should run the benchmark and see how it goes.
Sorry, something went wrong.
There was a problem hiding this comment.
I think the calls to emitBefore() and emitAfter() in class AsyncResource needs to be also adapted to pass the current resource.
Sorry, something went wrong.
|
@Qard Decided that you might be interested as you described this idea in #26540 |
Sorry, something went wrong.
|
I've got the stack form almost working, but the parallel/test-heapdump-async-hooks-init-promise.js test is failing and I haven't yet figured out why. I'll continue looking into it, but if anyone else has any ideas, let me know. |
Sorry, something went wrong.
|
Nevermind, forgot I had something commented out. It all works now. Just need to update the docs, as James requested, and it should be ready for another review. 😅 |
Sorry, something went wrong.
Sorry, something went wrong.
|
Thanks for working on this! I left some comments but non of them are intended to block this PR as they can be addressed in a separate PR. As far as I remember there is still one place left where an AsyncWrap is reused in node_file.cc but I'm quite sure that this can be easily fixed via a followup PR similar as the reuse in HTTP agent and parser. |
Sorry, something went wrong.
Remove the reference from handle to the unique/wrapping resource ReusedHandle as there is meanwhile a strong reference for all async resources in place via AsyncWarp::resource_. PR-URL: #32054 Refs: #30959 Refs: #30196 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Remove the reference from handle to the unique/wrapping resource ReusedHandle as there is meanwhile a strong reference for all async resources in place via AsyncWarp::resource_. PR-URL: #32054 Refs: #30959 Refs: #30196 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Wrap reused read_wrap in a unique async resource to ensure that executionAsyncResource() is not ambiguous. PR-URL: #31972 Refs: #30959 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Remove the reference from handle to the unique/wrapping resource ReusedHandle as there is meanwhile a strong reference for all async resources in place via AsyncWarp::resource_. PR-URL: #32054 Refs: #30959 Refs: #30196 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Wrap reused read_wrap in a unique async resource to ensure that executionAsyncResource() is not ambiguous. PR-URL: #31972 Refs: #30959 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Remove the need for the destroy hook in the basic APM case. Co-authored-by: Stephen Belanger <admin@stephenbelanger.com> PR-URL: nodejs#30959 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
This is a rebase of #21313
With llhttp in Node.js, the http parser reuse code now gives each reuse an AsyncResource so the concerns of the original attempt at a "current resource" API are no longer valid, unblocking it from landing now. This is basically identical to the original PR with some minor changes to appease the linter and to shuffle around some bits that moved in timers refactoring.
I'm working on this so I can update #26540 to use this form of the current resource API, eliminating a potential memory leak concern.
cc @nodejs/diagnostics @nodejs/async_hooks
Checklist