Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstream: always defer 'readable' with nextTick #17979
Conversation
mcollina
added
the
semver-major
label
Jan 4, 2018
nodejs-github-bot
added
the
stream
label
Jan 4, 2018
This comment has been minimized.
This comment has been minimized.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/12407/ |
This comment has been minimized.
This comment has been minimized.
|
This solves a recursive It's tagged as semver-major because I feel it might break some edge cases. We might want to revert this quickly if that is the case. |
jasnell
approved these changes
Jan 4, 2018
addaleax
approved these changes
Jan 4, 2018
| if (chunk.length === 32 * 1024) { // first chunk | ||
| readable.push(Buffer.alloc(34 * 1024)); // above hwm | ||
| // We should check if awaitDrain counter is increased in the next | ||
| // tick, because when the 'data' event is fired |
This comment has been minimized.
This comment has been minimized.
| process.nextTick(common.mustCall(() => { | ||
| readable.push(null); | ||
| })); | ||
| }), 10); |
This comment has been minimized.
This comment has been minimized.
| asyncReadable.push(null); | ||
| })); | ||
| assert.strictEqual(asyncReadable._readableState.needReadable, false); | ||
| }), 10); |
This comment has been minimized.
This comment has been minimized.
addaleax
Jan 4, 2018
Member
Ditto … using setTimeout() tends to introduce race conditions because they might expire before the current event loop turn is over, but setImmediate() always defers (and doesn’t keep test running longer than they need to)
mcollina
force-pushed the
mcollina:stream-next-tick-readable
branch
from
6de1dc6
to
102c2f0
Jan 5, 2018
This comment has been minimized.
This comment has been minimized.
|
Fixed nits. |
This comment has been minimized.
This comment has been minimized.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/12420/ Dicer should be fixed. |
This comment has been minimized.
This comment has been minimized.
|
Benchmarks? |
This comment has been minimized.
This comment has been minimized.
Benchmarks: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/87/ |
jasnell
reviewed
Jan 5, 2018
| } | ||
|
|
||
| if (data.length === 0) { | ||
| console.log('pushing null'); |
This comment has been minimized.
This comment has been minimized.
jasnell
reviewed
Jan 5, 2018
| }); | ||
|
|
||
| readable.on('end', common.mustCall(() => { | ||
| assert.strictEqual(i, (Math.floor(MAX / BATCH) + 1) * BATCH); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Still looks good to me. Couple of nits. |
benjamingr
approved these changes
Jan 5, 2018
This comment has been minimized.
This comment has been minimized.
streams/readable-bigread.js n=1000 0.40 % 0.7330756 No perf regression! |
This comment has been minimized.
This comment has been minimized.
|
Added docs, PTAL |
This comment has been minimized.
This comment has been minimized.
|
docs LGTM |
This comment has been minimized.
This comment has been minimized.
|
Landed as 1e0f331. |
mcollina
closed this
Jan 10, 2018
mcollina
added a commit
that referenced
this pull request
Jan 10, 2018
mcollina
added
the
notable-change
label
Jan 10, 2018
mafintosh
referenced this pull request
Jan 25, 2018
Closed
stream: fix readable being emitted when nothing to do #18372
mcollina
added a commit
that referenced
this pull request
Jan 29, 2018
kcaulfield94
added a commit
to kcaulfield94/node
that referenced
this pull request
Feb 2, 2018
msoechting
added a commit
to hpicgs/node
that referenced
this pull request
Feb 5, 2018
msoechting
added a commit
to hpicgs/node
that referenced
this pull request
Feb 5, 2018
mcollina
deleted the
mcollina:stream-next-tick-readable
branch
Feb 7, 2018
msoechting
added a commit
to hpicgs/node
that referenced
this pull request
Feb 7, 2018
msoechting
added a commit
to hpicgs/node
that referenced
this pull request
Feb 7, 2018
MayaLekova
added a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
jorgebay
referenced this pull request
May 16, 2018
Merged
Add node.js 10 to CI matrices and update tests to account for changes in node.js 10 #279
This comment has been minimized.
This comment has been minimized.
nevercast
commented
May 16, 2018
|
This landed is Node.js v10.1 yes? That is how I should interpret the linked commits? |
This comment has been minimized.
This comment has been minimized.
|
Yes this is in 10.1 |
mcollina commentedJan 4, 2018
•
edited
Fixes: #3203
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
stream