| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I would prefer we did not pass through the stream equivalents for pipeline - I'm not sure if it's feasible. The main reason is performance: streams adds a lot of overhead and a pipeline composed by async iterators can be extremely more performant. I'm not sure if this is feasible or just a dream. |
Sorry, something went wrong.
Might be feasible. I've updated the PR. |
Sorry, something went wrong.
|
@mcollina: I think you will like this iteration. Now it's possible to do e.g. let res = '';
pipeline(async function*() {
await new Promise((resolve) => process.nextTick(resolve));
yield 'hello';
yield 'world';
}, async function*(source) {
for await (const chunk of source) {
yield chunk.toUpperCase();
}
}, async function(source) {
for await (const chunk of source) {
res += chunk;
}
}, common.mustCall((err) => {
assert.strictEqual(err, undefined);
assert.strictEqual(res, 'HELLOWORLD');
}));Without passing through the stream equivalents for pipeline. Still needs some work to ensure edge cases are covered and errors are properly thrown. WIP label please. |
Sorry, something went wrong.
Sorry, something went wrong.
|
CITGM looks good. |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I’m lost on why this is semver-major. Can you recap why on the PR description?
Sorry, something went wrong.
I think it was in an earlier version but I can't see either that it would be now. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Notable change? |
Sorry, something went wrong.
|
@ronag i tried to backport this to v13.x, but it seems to have broken CI; See https://travis-ci.com/nodejs/node/jobs/288147410 |
Sorry, something went wrong.
|
@codebytere: Yes, it seems eos is calling the callback earlier in 13.x. I'll make a fix for master which we can backport. |
Sorry, something went wrong.
|
@ronag does this still need a backport? |
Sorry, something went wrong.
|
@MylesBorins I've already backported it #31975. Did I miss a label or something? |
Sorry, something went wrong.
|
@ronag thanks! when something has been backported we usually apply a different label. backport-open once it has been opened and backported-to when it has landed |
Sorry, something went wrong.
|
Depends at least on #30869 to land on v12.x |
Sorry, something went wrong.
|
@targos: I don't think this should land on v12 |
Sorry, something went wrong.
|
@ronag why not? I we do not backport the recent stream changes, this subsystem will be really difficult to maintain on v12. There are almost conflicts with every pull request. |
Sorry, something went wrong.
Disregard my previous comment. You are right. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add support for generators and functions in pipeline.
This makes it possible to do the following:
Checklist