Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Node.js Version: 13.*
- OS: mac
- Scope (install, code, runtime, meta, other?):
- Module (and version) (if relevant):
In case of synchronous pipe removal in _transform, the resume method does not resume as expected
conststream=require('stream')constfs=require('fs');constreadStream=fs.createReadStream('big.txt')constwriteStream=fs.createWriteStream('result.txt');consttransformStream=newclassextendsstream.Transform{_transform(chunk,encoding,callback){readStream.unpipe()readStream.resume()}}readStream.on('end',()=>{console.log('never print')})readStream.pipe(transformStream).pipe(writeStream)Nevertheless, resume operation during an asynchronous call and removal not from the _transform method
Can someone explain this behavior why unpipe () and resume () do not work in the _transform method?
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.