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

src: introduce TimerWrap/TimerWrapHandle utility by jasnell · Pull Request #34186 · nodejs/node · GitHub

/ node Public

src: introduce TimerWrap/TimerWrapHandle utility - #34186

Closed
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:timers-wrap
Closed

src: introduce TimerWrap/TimerWrapHandle utility#34186
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:timers-wrap

Conversation

jasnell commented Jul 3, 2020

Copy link
Copy Markdown
Member

Several places throughout src/* make use of uv_timer_t internally (inspector, perf, quic, etc). These duplicate code. This introduces a new utility class to consolidate code and make it easier overall to work with internal uv_timer_t instances.

First commit adds the utility, subsequent commits update systems that use it.

The quic specific commit cannot be backported to 14.x, the rest of the commits are backportable.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

jasnell requested a review from a team July 3, 2020 17:01
nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Jul 3, 2020

Copy link
Copy Markdown
Collaborator

Comment thread src/timer_wrap.cc Outdated
Comment thread src/timer_wrap.h Outdated
Comment thread src/node_perf.cc Outdated
Comment thread src/node_perf.h Outdated
jasnell requested a review from addaleax July 3, 2020 18:27
jasnell added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jul 3, 2020

nodejs-github-bot commented Jul 3, 2020
edited by addaleax
Loading

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32204/ (:yellow_heart:)

mcollina 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

jasnell added 3 commits July 5, 2020 14:21
Consolidate uv_timer_t boilerplate code into a shared utility.
There are several places throughout the code where we use uv_timer_t
internally (inspector, perf, quic), with some code duplication.
This eliminates the duplicated code, ensures that cleanup occurs
correctly, and simplifies use of the timers.

Signed-off-by: James M Snell <jasnell@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com>
jasnell added a commit that referenced this pull request Jul 5, 2020
Consolidate uv_timer_t boilerplate code into a shared utility.
There are several places throughout the code where we use uv_timer_t
internally (inspector, perf, quic), with some code duplication.
This eliminates the duplicated code, ensures that cleanup occurs
correctly, and simplifies use of the timers.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
jasnell added a commit that referenced this pull request Jul 5, 2020
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
jasnell added a commit that referenced this pull request Jul 5, 2020
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

jasnell commented Jul 5, 2020

Copy link
Copy Markdown
Member Author

Landed in d4f6900, e19a251, and 0f97d60

jasnell closed this Jul 5, 2020
addaleax added a commit to addaleax/node that referenced this pull request Jul 7, 2020
0f97d60 accidentally removed this.

Refs: nodejs#34186
jasnell pushed a commit to jasnell/node that referenced this pull request Jul 8, 2020
0f97d60 accidentally removed this.

Refs: nodejs#34186
jasnell pushed a commit that referenced this pull request Jul 9, 2020
0f97d60 accidentally removed this.

Refs: #34186

PR-URL: #34247
Reviewed-By: James M Snell <jasnell@gmail.com>

Copy link
Copy Markdown
Contributor

Marked as "backport-requested" because I do not believe quic is on 14.x yet. Should we change the label to "dont-land"?

targos added backported-to-v14.x and removed author ready PRs that have at least one approval, no outstanding review comments, and a CI started. backport-requested-v14.x labels Apr 30, 2021
targos pushed a commit that referenced this pull request May 1, 2021
Consolidate uv_timer_t boilerplate code into a shared utility.
There are several places throughout the code where we use uv_timer_t
internally (inspector, perf, quic), with some code duplication.
This eliminates the duplicated code, ensures that cleanup occurs
correctly, and simplifies use of the timers.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos pushed a commit that referenced this pull request May 1, 2021
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
danielleadams mentioned this pull request May 3, 2021
codebytere added a commit to electron/electron that referenced this pull request May 14, 2021
codebytere added a commit to electron/electron that referenced this pull request May 14, 2021
codebytere added a commit to electron/electron that referenced this pull request May 18, 2021
codebytere added a commit to electron/electron that referenced this pull request May 18, 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

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL