GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: refactor stream callbacks and ownership by addaleax · Pull Request #18334 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented Jan 24, 2018

Copy link
Copy Markdown
Member

Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean consume_ flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

Benchmark results show no significant changes:
$ ./node benchmark/compare.js --runs 5 --new ./node --old ./node-master net | Rscript benchmark/compare.R
[00:43:05|% 100| 8/8 files | 10/10 runs | 6/6 configs]: Done
                                                                      improvement confidence     p.value
 net/net-c2s-cork.js dur=5 type="buf" len=1024                           -0.80 %            0.720985414
 net/net-c2s-cork.js dur=5 type="buf" len=128                            -3.50 %            0.278786279
 net/net-c2s-cork.js dur=5 type="buf" len=16                             -4.44 %          * 0.010458284
 net/net-c2s-cork.js dur=5 type="buf" len=32                             -0.51 %            0.445313528
 net/net-c2s-cork.js dur=5 type="buf" len=4                              -1.57 %            0.074816557
 net/net-c2s-cork.js dur=5 type="buf" len=512                            -0.25 %            0.926451422
 net/net-c2s-cork.js dur=5 type="buf" len=64                              1.66 %          * 0.020469582
 net/net-c2s-cork.js dur=5 type="buf" len=8                              -0.18 %            0.739524856
 net/net-c2s.js dur=5 type="asc" len=102400                              -0.22 %            0.904819514
 net/net-c2s.js dur=5 type="asc" len=16777216                             0.34 %            0.862222556
 net/net-c2s.js dur=5 type="buf" len=102400                              -0.45 %            0.755593966
 net/net-c2s.js dur=5 type="buf" len=16777216                             1.87 %            0.477896886
 net/net-c2s.js dur=5 type="utf" len=102400                              -0.30 %            0.572739665
 net/net-c2s.js dur=5 type="utf" len=16777216                             1.18 %            0.369268245
 net/net-pipe.js dur=5 type="asc" len=102400                              1.18 %            0.368102481
 net/net-pipe.js dur=5 type="asc" len=16777216                            0.41 %            0.659646192
 net/net-pipe.js dur=5 type="buf" len=102400                              1.65 %            0.148484290
 net/net-pipe.js dur=5 type="buf" len=16777216                            0.05 %            0.949649889
 net/net-pipe.js dur=5 type="utf" len=102400                              0.65 %            0.463140117
 net/net-pipe.js dur=5 type="utf" len=16777216                            0.57 %            0.531757174
 net/net-s2c.js dur=5 type="asc" len=102400                               0.01 %            0.994663657
 net/net-s2c.js dur=5 type="asc" len=16777216                             0.55 %            0.690648594
 net/net-s2c.js dur=5 type="buf" len=102400                               1.06 %            0.162661878
 net/net-s2c.js dur=5 type="buf" len=16777216                             2.21 %            0.458328732
 net/net-s2c.js dur=5 type="utf" len=102400                               0.47 %            0.346382821
 net/net-s2c.js dur=5 type="utf" len=16777216                            -1.19 %            0.075676276
 net/net-wrap-js-stream-passthrough.js dur=5 type="asc" len=102400       -5.01 %            0.566507367
 net/net-wrap-js-stream-passthrough.js dur=5 type="asc" len=16777216      1.81 %            0.382296906
 net/net-wrap-js-stream-passthrough.js dur=5 type="buf" len=102400       -4.32 %            0.543143575
 net/net-wrap-js-stream-passthrough.js dur=5 type="buf" len=16777216      0.12 %            0.774690856
 net/net-wrap-js-stream-passthrough.js dur=5 type="utf" len=102400        2.33 %            0.152586683
 net/net-wrap-js-stream-passthrough.js dur=5 type="utf" len=16777216      0.50 %            0.687525683
 net/tcp-raw-c2s.js dur=5 type="asc" len=102400                           0.05 %            0.917082371
 net/tcp-raw-c2s.js dur=5 type="asc" len=16777216                         4.17 %         ** 0.005564067
 net/tcp-raw-c2s.js dur=5 type="buf" len=102400                           0.56 %          * 0.037673166
 net/tcp-raw-c2s.js dur=5 type="buf" len=16777216                         0.77 %         ** 0.006890503
 net/tcp-raw-c2s.js dur=5 type="utf" len=102400                          -0.50 %            0.397862701
 net/tcp-raw-c2s.js dur=5 type="utf" len=16777216                         1.00 %            0.300638263
 net/tcp-raw-pipe.js dur=5 type="asc" len=102400                          0.82 %            0.722353484
 net/tcp-raw-pipe.js dur=5 type="asc" len=16777216                       15.00 %            0.070918075
 net/tcp-raw-pipe.js dur=5 type="buf" len=102400                         -1.03 %            0.819639125
 net/tcp-raw-pipe.js dur=5 type="buf" len=16777216                       18.35 %            0.329069149
 net/tcp-raw-pipe.js dur=5 type="utf" len=102400                         -0.27 %            0.984576346
 net/tcp-raw-pipe.js dur=5 type="utf" len=16777216                        2.78 %            0.362840470
 net/tcp-raw-s2c.js dur=5 type="asc" len=102400                          -0.15 %            0.820491736
 net/tcp-raw-s2c.js dur=5 type="asc" len=16777216                        -0.42 %            0.813160796
 net/tcp-raw-s2c.js dur=5 type="buf" len=102400                           0.26 %            0.615102013
 net/tcp-raw-s2c.js dur=5 type="buf" len=16777216                        -2.16 %            0.464289164
 net/tcp-raw-s2c.js dur=5 type="utf" len=102400                          -0.33 %            0.383964275
 net/tcp-raw-s2c.js dur=5 type="utf" len=16777216                         1.08 %            0.224603980

As a heads up, after this I’d like to also refactor the writable side a bit more by removing WriteWrap and ShutdownWrap as explicit classes; I have some WIP work but haven’t gotten that to pass all TLS tests yet…

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

src

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@addaleax
addaleax requested a review from apapirovski January 24, 2018 00:16
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels Jan 24, 2018
@addaleax

addaleax commented Jan 24, 2018

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-commit/15636/
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1222/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Jan 24, 2018

Copy link
Copy Markdown
Member

Generally +1 on this but it's going to take a bit to review.

ping @mcollina

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Jan 24, 2018

Copy link
Copy Markdown
Member Author

CITGM blew up with ENOSPC on AIX but other than that I think we’re good. (Will run CITGM again at a later point to make sure).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Jan 24, 2018

Copy link
Copy Markdown
Member Author

Pushed another commit that simplifies the passing of handles to/from child processes quite a bit.

I realize that this PR might take a while to review, but I’d like to invite any @nodejs/collaborators who want to to do that and watch out for bits that aren’t immediately clear here, because a main goal of this PR is increasing readability & adding documentation to the C++ code parts.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Jan 24, 2018
View reviewed changes
jasnell
jasnell reviewed Jan 25, 2018
View reviewed changes
Comment thread src/stream_base.h Outdated

@jasnell jasnell Jan 25, 2018

Copy link
Copy Markdown
Member

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.

extreme nit: s/Node's/Node.js'

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@apapirovski

apapirovski commented Jan 25, 2018

Copy link
Copy Markdown
Contributor

I've started reviewing and very much +1 on this change but won't get a chance to finish until later today or tomorrow morning.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Jan 25, 2018

Copy link
Copy Markdown
Member Author

@apapirovski I definitely won’t land this before next week, there’s no rush. :)

jasnell reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Jan 25, 2018

Copy link
Copy Markdown
Member

The changes look very good overall (thus the sign off). I would like to see some benchmark runs. I don't anticipate much impact, but given how much code this touches, it would be worthwhile.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Jan 25, 2018

Copy link
Copy Markdown
Member

ha! nevermind! I missed the collapsed section in the original post :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax
addaleax force-pushed the stream-listener branch from bc23a25 to 2ecac89 Compare January 25, 2018 02:43
@gibfahn

gibfahn commented Jan 25, 2018

Copy link
Copy Markdown
Member

@addaleax CitGM should be better now.

jasnell reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maclover7
maclover7 force-pushed the master branch from bb5575a to 993b716 Compare January 26, 2018 22:02
@cjihrig
cjihrig force-pushed the master branch from 993b716 to 082f952 Compare January 26, 2018 22:36
@addaleax
addaleax force-pushed the stream-listener branch 2 times, most recently from bbd7913 to 39fb222 Compare January 29, 2018 02:09
apapirovski
apapirovski approved these changes Jan 29, 2018
View reviewed changes

@apapirovski apapirovski left a comment

Copy link
Copy Markdown
Contributor

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 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mcollina
mcollina approved these changes Jan 30, 2018
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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, this is very solid work.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@addaleax
addaleax force-pushed the stream-listener branch from 39fb222 to 2bcc28d Compare January 31, 2018 14:25
addaleax added 2 commits January 31, 2018 15:26
@addaleax
src: refactor stream callbacks and ownership
465e550
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

Benchmark results show no significant changes:

    $ ./node benchmark/compare.js --runs 5 --new ./node --old ./node-master net | Rscript benchmark/compare.R
    [00:43:05|% 100| 8/8 files | 10/10 runs | 6/6 configs]: Done
                                                                          improvement confidence     p.value
     net/net-c2s-cork.js dur=5 type="buf" len=1024                           -0.80 %            0.720985414
     net/net-c2s-cork.js dur=5 type="buf" len=128                            -3.50 %            0.278786279
     net/net-c2s-cork.js dur=5 type="buf" len=16                             -4.44 %          * 0.010458284
     net/net-c2s-cork.js dur=5 type="buf" len=32                             -0.51 %            0.445313528
     net/net-c2s-cork.js dur=5 type="buf" len=4                              -1.57 %            0.074816557
     net/net-c2s-cork.js dur=5 type="buf" len=512                            -0.25 %            0.926451422
     net/net-c2s-cork.js dur=5 type="buf" len=64                              1.66 %          * 0.020469582
     net/net-c2s-cork.js dur=5 type="buf" len=8                              -0.18 %            0.739524856
     net/net-c2s.js dur=5 type="asc" len=102400                              -0.22 %            0.904819514
     net/net-c2s.js dur=5 type="asc" len=16777216                             0.34 %            0.862222556
     net/net-c2s.js dur=5 type="buf" len=102400                              -0.45 %            0.755593966
     net/net-c2s.js dur=5 type="buf" len=16777216                             1.87 %            0.477896886
     net/net-c2s.js dur=5 type="utf" len=102400                              -0.30 %            0.572739665
     net/net-c2s.js dur=5 type="utf" len=16777216                             1.18 %            0.369268245
     net/net-pipe.js dur=5 type="asc" len=102400                              1.18 %            0.368102481
     net/net-pipe.js dur=5 type="asc" len=16777216                            0.41 %            0.659646192
     net/net-pipe.js dur=5 type="buf" len=102400                              1.65 %            0.148484290
     net/net-pipe.js dur=5 type="buf" len=16777216                            0.05 %            0.949649889
     net/net-pipe.js dur=5 type="utf" len=102400                              0.65 %            0.463140117
     net/net-pipe.js dur=5 type="utf" len=16777216                            0.57 %            0.531757174
     net/net-s2c.js dur=5 type="asc" len=102400                               0.01 %            0.994663657
     net/net-s2c.js dur=5 type="asc" len=16777216                             0.55 %            0.690648594
     net/net-s2c.js dur=5 type="buf" len=102400                               1.06 %            0.162661878
     net/net-s2c.js dur=5 type="buf" len=16777216                             2.21 %            0.458328732
     net/net-s2c.js dur=5 type="utf" len=102400                               0.47 %            0.346382821
     net/net-s2c.js dur=5 type="utf" len=16777216                            -1.19 %            0.075676276
     net/net-wrap-js-stream-passthrough.js dur=5 type="asc" len=102400       -5.01 %            0.566507367
     net/net-wrap-js-stream-passthrough.js dur=5 type="asc" len=16777216      1.81 %            0.382296906
     net/net-wrap-js-stream-passthrough.js dur=5 type="buf" len=102400       -4.32 %            0.543143575
     net/net-wrap-js-stream-passthrough.js dur=5 type="buf" len=16777216      0.12 %            0.774690856
     net/net-wrap-js-stream-passthrough.js dur=5 type="utf" len=102400        2.33 %            0.152586683
     net/net-wrap-js-stream-passthrough.js dur=5 type="utf" len=16777216      0.50 %            0.687525683
     net/tcp-raw-c2s.js dur=5 type="asc" len=102400                           0.05 %            0.917082371
     net/tcp-raw-c2s.js dur=5 type="asc" len=16777216                         4.17 %         ** 0.005564067
     net/tcp-raw-c2s.js dur=5 type="buf" len=102400                           0.56 %          * 0.037673166
     net/tcp-raw-c2s.js dur=5 type="buf" len=16777216                         0.77 %         ** 0.006890503
     net/tcp-raw-c2s.js dur=5 type="utf" len=102400                          -0.50 %            0.397862701
     net/tcp-raw-c2s.js dur=5 type="utf" len=16777216                         1.00 %            0.300638263
     net/tcp-raw-pipe.js dur=5 type="asc" len=102400                          0.82 %            0.722353484
     net/tcp-raw-pipe.js dur=5 type="asc" len=16777216                       15.00 %            0.070918075
     net/tcp-raw-pipe.js dur=5 type="buf" len=102400                         -1.03 %            0.819639125
     net/tcp-raw-pipe.js dur=5 type="buf" len=16777216                       18.35 %            0.329069149
     net/tcp-raw-pipe.js dur=5 type="utf" len=102400                         -0.27 %            0.984576346
     net/tcp-raw-pipe.js dur=5 type="utf" len=16777216                        2.78 %            0.362840470
     net/tcp-raw-s2c.js dur=5 type="asc" len=102400                          -0.15 %            0.820491736
     net/tcp-raw-s2c.js dur=5 type="asc" len=16777216                        -0.42 %            0.813160796
     net/tcp-raw-s2c.js dur=5 type="buf" len=102400                           0.26 %            0.615102013
     net/tcp-raw-s2c.js dur=5 type="buf" len=16777216                        -2.16 %            0.464289164
     net/tcp-raw-s2c.js dur=5 type="utf" len=102400                          -0.33 %            0.383964275
     net/tcp-raw-s2c.js dur=5 type="utf" len=16777216                         1.08 %            0.224603980

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax
src: simplify transferring handles for libuv streams
69f3831
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax
addaleax force-pushed the stream-listener branch from 2bcc28d to 69f3831 Compare January 31, 2018 14:28
@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jan 31, 2018
@addaleax

addaleax commented Jan 31, 2018

Copy link
Copy Markdown
Member Author

Fresh CI: https://ci.nodejs.org/job/node-test-commit/15821/
Fresh CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1246/

I’d like to land this once these come back good.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Feb 1, 2018

Copy link
Copy Markdown
Member

Landed in 7c4b09b, 5898dc3

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR BridgeAR closed this Feb 1, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Feb 1, 2018
@addaleax @BridgeAR
src: refactor stream callbacks and ownership
7c4b09b
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Feb 1, 2018
@addaleax @BridgeAR
src: simplify handles for libuv streams
5898dc3
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax
addaleax deleted the stream-listener branch February 1, 2018 17:12
@addaleax addaleax removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Feb 1, 2018
@addaleax addaleax mentioned this pull request Feb 10, 2018
src: refactor WriteWrap and ShutdownWrap #18676
Closed
3 tasks done
@MylesBorins MylesBorins added the backport-requested-v9.x label Feb 20, 2018
@MylesBorins

MylesBorins commented Feb 20, 2018

Copy link
Copy Markdown
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax added a commit to addaleax/node that referenced this pull request Feb 26, 2018
@addaleax
src: refactor stream callbacks and ownership
3e0ae35
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
addaleax added a commit to addaleax/node that referenced this pull request Feb 26, 2018
@addaleax
src: simplify handles for libuv streams
2247711
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax addaleax removed the backport-requested-v9.x label Feb 26, 2018
addaleax added a commit that referenced this pull request Feb 26, 2018
@addaleax
src: refactor stream callbacks and ownership
367241a
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: #18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
addaleax added a commit that referenced this pull request Feb 26, 2018
@addaleax
src: simplify handles for libuv streams
6a70933
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: #18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
addaleax added a commit that referenced this pull request Feb 26, 2018
@addaleax
src: refactor stream callbacks and ownership
b8f4ad8
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: #18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
addaleax added a commit that referenced this pull request Feb 26, 2018
@addaleax
src: simplify handles for libuv streams
5eaaca2
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: #18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 26, 2018
@addaleax @MylesBorins
src: refactor stream callbacks and ownership
cb5ed45
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: #18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 26, 2018
@addaleax @MylesBorins
src: simplify handles for libuv streams
684684e
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: #18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax addaleax mentioned this pull request Feb 27, 2018
v9.7.0 proposal #19040
Closed
@addaleax addaleax added dont-land-on-v6.x labels Mar 28, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@addaleax @MayaLekova
src: refactor stream callbacks and ownership
85d0282
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@addaleax @MayaLekova
src: simplify handles for libuv streams
039d81f
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@mcollina mcollina mcollina approved these changes
+1 more reviewer
@apapirovski apapirovski apapirovski approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@addaleax @jasnell @apapirovski @gibfahn @BridgeAR @MylesBorins @mcollina @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.