-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: add an internal [@@refresh()] function #18065
Conversation
lib/internal/http2/core.js
Outdated
@@ -908,7 +907,7 @@ class Http2Session extends EventEmitter { | |||
[kUpdateTimer]() { | |||
if (this.destroyed) | |||
return; | |||
if (this[kTimeout]) _unrefActive(this[kTimeout]); | |||
if (this[kTimeout]) this[kTimeout][refresh_fn_symbol](true); |
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.
what is the true
argument for?
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.
whoops, was from a previous API version
11f4c34
to
8c5aa92
Compare
@apapirovski @zhangzifa Any thoughts? |
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 would personally prefer if we went with camel case for the symbols, to match the vast majority of new usage, but the rest of this SGTM. 👍
8c5aa92
to
a08570c
Compare
Updated, new CI: https://ci.nodejs.org/job/node-test-pull-request/12755/ @apapirovski better now? |
Just cleanup so the file makes more future sense. PR-URL: nodejs#18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Hidden via a symbol because I'm unsure exactly what the API should look like in the end. Removes the need to use _unrefActive for efficiently refreshing timeouts. It still uses it under the hood but that could be replaced with insert() directly if it were in the same file. PR-URL: nodejs#18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
a08570c
to
acb5ad3
Compare
Just cleanup so the file makes more future sense. PR-URL: #18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Hidden via a symbol because I'm unsure exactly what the API should look like in the end. Removes the need to use _unrefActive for efficiently refreshing timeouts. It still uses it under the hood but that could be replaced with insert() directly if it were in the same file. PR-URL: #18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Thanks, landed in a5a8118...bb5575a |
This does not land cleanly on v9.x, should we backport? |
Just cleanup so the file makes more future sense. PR-URL: nodejs#18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Hidden via a symbol because I'm unsure exactly what the API should look like in the end. Removes the need to use _unrefActive for efficiently refreshing timeouts. It still uses it under the hood but that could be replaced with insert() directly if it were in the same file. PR-URL: nodejs#18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
@Fishrock123 should this be backported to |
@codebytere It’d be nice to backport — do you know if it depends on other commits of mine, or only the large timers refactor? I’ll try to get a backport PR up soon... |
@Fishrock123 my cursory inspection tells me the two timers commits need to be backported in concert but beyond that i think you're good! |
Hidden via a symbol because I'm unsure exactly what the API should look like in the end.
Removes the need to use
_unrefActive()
for efficiently refreshing timeouts. It still uses it under the hood but that could be replaced withinsert()
directly if it were in the same file.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
timers