The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / test / simple / test-stream2-readable-non-empty-end.js @ 6f043940

History | View | Annotate | Download (2.24 KB)

# Date Author Comment
88644eaa 02/28/2013 08:38 PM isaacs

stream: There is no _read cb, there is only push

This makes it so that `stream.push(chunk)` is the only way to signal the
end of reading, removing the confusing disparity between the
callback-style _read method, and the fact that most real-world streams
do not have a 1:1 corollation between the "please give me data" event,...

27fafd46 01/14/2013 06:22 PM isaacs

stream: Do not call endReadable on a non-empty stream

Say that a stream's current read queue has 101 bytes in it, and the
underlying resource has ended (ie, reached EOF).

If you do something like this:

stream.read(100); // leave a byte behind
stream.read(0); // read(0) for some reason...