-
-
Notifications
You must be signed in to change notification settings - Fork 35k
Description
Affected URL(s)
https://nodejs.org/dist/latest-v19.x/docs/api/stream.html#readable_readsize
Description of the problem
Now docs say
When readable._read() is called, if data is available from the resource, the implementation should begin pushing that data into the read queue using the this.push(dataChunk) method.
but they don't say what to do if data is not yet available from the resource. Also, the overall text creates an impression (at least for me) that it's enough to implement this method only for the stream to work. Only the example for readable.push sheds some light on how it is supposed to deal with resources that are being written while reading. If that's a recommended way, I think it should be mentioned as such and also underline that this way fits for Node's Readable streams as well.