-
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
AsyncLocalStorage potential issue ? #33580
Comments
Hello @FranckFreiburger ! that's a good point. I remember we discussed it with @Qard , @puzpuzpuz and @Flarna on the PR but I can't find it back. There might actually be a memory leak in case of a reused resource. |
All existing resource reuse should be using an The line in the doc is not exactly true anymore, though I hesitate slightly to remove it as it's still possible for native modules to reuse a resource without an |
There should be no reuse anymore within node core - at least not in the sense of the resource visible via async hooks. see e.g Line 235 in 5d81e4d
But there is no way to gurantee that some userland module reuses an resource object. And this potential reuse can be native or managed. There is an open PR regarding potential wrong reuse via NAPI: #32930 But again it dependes on the actual native addon. |
@FranckFreiburger |
node/lib/async_hooks.js
Line 248 in 9949a2e
You are using the
resource
object to store thestore
whereas the doc state :I just wondering if it is ok.
The text was updated successfully, but these errors were encountered: