FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

timers: remove redundant unref calls by gioragutt · Pull Request #38320 · nodejs/node · GitHub

/ node Public

timers: remove redundant unref calls - #38320

Merged
Trott merged 1 commit into
nodejs:masterfrom
gioragutt:giorag/remove-redundant-unref-calls
Apr 24, 2021
Merged

timers: remove redundant unref calls#38320
Trott merged 1 commit into
nodejs:masterfrom
gioragutt:giorag/remove-redundant-unref-calls

Conversation

Copy link
Copy Markdown
Contributor

Remove redundant calls to Timeout.unref() by passing the
ref: boolean parameter of timers/promises#setTimeout and
timers/promises#setInterval directly to Timeout constructor's
isRefed parameter.

Note: possible expansion of this PR is to apply the same isRefed
parameter from Timeout to Immediate to prevent the same redundant
Immediate.unref() call in timers/promises#setImmediate.

nodejs-github-bot added the needs-ci PRs that need a full CI run. label Apr 20, 2021

Copy link
Copy Markdown
Contributor Author

Hey @jasnell, thanks for the quick review.

I have a question tho. Does my change actually change something other than a redundant call (and state changes)?

I tried looking around, but I couldn't find a reason for it to be actually meaningful 🧐 (other than of course not doing something redundant).

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM but we probably need a perf benchmark. Will start one in a moment.

Trott commented Apr 24, 2021

Copy link
Copy Markdown
Member

Trott commented Apr 24, 2021

Copy link
Copy Markdown
Member

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1014/

No significant changes in benchmark performance.

Copy link
Copy Markdown
Collaborator

PR-URL: nodejs#38320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Trott force-pushed the giorag/remove-redundant-unref-calls branch from 63c6270 to d9b56fe Compare April 24, 2021 22:06

Trott commented Apr 24, 2021

Copy link
Copy Markdown
Member

Landed in d9b56fe

Trott merged commit d9b56fe into nodejs:master Apr 24, 2021
targos pushed a commit that referenced this pull request Apr 29, 2021
PR-URL: #38320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos mentioned this pull request May 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL