-
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
process: deprecate _getActive*
private APIs in favour of async_hooks
#40804
process: deprecate _getActive*
private APIs in favour of async_hooks
#40804
Conversation
20336e2
to
82fe642
Compare
We probably need a runtime deprecation first, right? |
The `process._getActiveRequests()` and `process._getActiveHandles()` functions are not needed anymore because the `async_hooks` module already provides functionality that helps us to keep a track of the active resources. Signed-off-by: Darshan Sen <[email protected]>
82fe642
to
bcf7c12
Compare
_getActive*
functions in favour of async_hooks
_getActive*
private APIs in favour of async_hooks
Don't you need to set up various async hooks in advance to be able to achieve the same thing? Additionally as far as I'm aware, using Also even though these functions are "private", I have a feeling this could cause a lot of breakage in the ecosystem. |
I agree with @mscdex. |
const NUM = 8; | ||
const connections = []; | ||
const clients = []; | ||
let clients_counter = 0; |
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.
I think we should leave the actual test in place since we're not removing these APIs yet.
Are you talking about the overhead incurred for this hook creation in particular or any Lines 258 to 266 in cf56abe
If ^, I think we can get rid of that one in #40810.
If we make it public, which exact module/object should we expose this from? |
Still too early to deprecate. There are some valid uses of the underlying handles that hasn't been addressed yet. (see #40813 (comment) for some uses in public GH repos) |
The
process._getActiveRequests()
andprocess._getActiveHandles()
functions are not needed anymore because the
async_hooks
modulealready provides functionality that helps us to keep a track of the
active resources.
Signed-off-by: Darshan Sen [email protected]