Skip to content
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

Closed

Conversation

Fishrock123
Copy link
Contributor

@Fishrock123 Fishrock123 commented Mar 18, 2019

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. label Mar 18, 2019
@Fishrock123 Fishrock123 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Mar 18, 2019
doc/api/deprecations.md Outdated Show resolved Hide resolved
Type: Runtime

The previously undocumented and "private" `timers.active()` is deprecated.
Please use the publicly documented [`timeout.refresh()`][] instead.
Copy link
Contributor

@mscdex mscdex Mar 18, 2019

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?

Copy link
Contributor Author

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.

@@ -2368,6 +2368,38 @@ Type: Runtime

The `_stream_wrap` module is deprecated.

<a id="DEP0126"></a>
Copy link
Contributor

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)?

Copy link
Contributor Author

@Fishrock123 Fishrock123 Mar 19, 2019

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...

doc/api/deprecations.md Outdated Show resolved Hide resolved
doc/api/deprecations.md Outdated Show resolved Hide resolved
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
@richardlau richardlau added the deprecations Issues and PRs related to deprecations. label Mar 19, 2019
@Fishrock123 Fishrock123 added the semver-minor PRs that contain new features and should be released in the next minor version. label Mar 20, 2019
@Fishrock123
Copy link
Contributor Author

@nodejs/tsc I would like approval to land this as semver-minor, just like the related former pr: #20298, considering it deprecates undocumented methods.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@apapirovski apapirovski left a 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.

@BridgeAR
Copy link
Member

CI https://ci.nodejs.org/job/node-test-pull-request/21746/

@Fishrock123 just as a note: this was not author-ready until now (our guidelines say the CI has to be triggered and AFAIK the lite CI does not count in this case).

@Fishrock123
Copy link
Contributor Author

@BridgeAR Oh, whoops. Will remember for next time. This LG to you now? CI is happy.

@BridgeAR
Copy link
Member

@Fishrock123 yes, this is still LGTM.

Fishrock123 added a commit to Fishrock123/node that referenced this pull request Mar 23, 2019
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 <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@Fishrock123
Copy link
Contributor Author

Landed in 7c80f18

@Fishrock123 Fishrock123 deleted the timers-active-deprecation branch March 23, 2019 02:59
targos pushed a commit that referenced this pull request Mar 28, 2019
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 <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos pushed a commit that referenced this pull request Mar 30, 2019
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 <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. deprecations Issues and PRs related to deprecations. semver-minor PRs that contain new features and should be released in the next minor version. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants