-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
timers: deprecate active() and _unrefActive() #26760
Conversation
67a522f
to
41d48d7
Compare
Type: Runtime | ||
|
||
The previously undocumented and "private" `timers.active()` is deprecated. | ||
Please use the publicly documented [`timeout.refresh()`][] instead. |
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.
Does timers._unrefActive()
really do the same thing as timeout.refresh()
? Shouldn't we only be recommending timeout.unref()
as a replacement?
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.
It's an awkward combination of both. It is essentially "refresh this timer as unrefed". Active is the same, but refed.
Perhaps there was an extra meaning back when {un}ref()
made separate libuv handles. I'm not sure but that doesn't exist anymore regardless.
41d48d7
to
696a869
Compare
@@ -2368,6 +2368,38 @@ Type: Runtime | |||
|
|||
The `_stream_wrap` module is deprecated. | |||
|
|||
<a id="DEP0126"></a> |
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.
Should this be DEP0XXX
till landing (here, below and in the next section)?
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.
Does it really matter? ¯\_(ツ)_/¯
So long as it's updated if necessary at landing...
Another nail in the coffin here, farewell ye ol C-style apis. These apis caused numerous other issues that required far too many safeguards. This gets us one step closer to not having to worry about those issues anymore. Refs: nodejs#18066 Refs: nodejs#20298 PR-URL: nodejs#26760
696a869
to
1b80a2b
Compare
@nodejs/tsc I would like approval to land this as semver-minor, just like the related former pr: #20298, considering it deprecates undocumented methods. |
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
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.
In favor of semver-minor.
CI https://ci.nodejs.org/job/node-test-pull-request/21746/ @Fishrock123 just as a note: this was not |
@BridgeAR Oh, whoops. Will remember for next time. This LG to you now? CI is happy. |
@Fishrock123 yes, this is still LGTM. |
Another nail in the coffin here, farewell ye ol C-style apis. These apis caused numerous other issues that required far too many safeguards. This gets us one step closer to not having to worry about those issues anymore. Refs: nodejs#18066 Refs: nodejs#20298 PR-URL: nodejs#26760 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Landed in 7c80f18 |
Another nail in the coffin here, farewell ye ol C-style apis. These apis caused numerous other issues that required far too many safeguards. This gets us one step closer to not having to worry about those issues anymore. Refs: #18066 Refs: #20298 PR-URL: #26760 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Another nail in the coffin here, farewell ye ol C-style apis. These apis caused numerous other issues that required far too many safeguards. This gets us one step closer to not having to worry about those issues anymore. Refs: #18066 Refs: #20298 PR-URL: #26760 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Another nail in the coffin here, farewell ye ol C-style apis.
These apis caused numerous other issues that required far too many safeguards.
This gets us one step closer to not having to worry about those issues anymore.
Refs: #18066
Refs: #20298
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes