This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
streams: data/pipe and readable can't be used together #8568
Labels
Comments
Maybe it should be added to the docs that "readable" almost (except the EOF) never happens in "flowing" mode? |
@iliakan I tend to agree with you on this. I'd say something like:
How does it sound to you? cc @trevnorris @bnoordhuis |
To be precise:
|
@iliakan Sounds good. Want to open a PR? |
Landed in b436e59 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
data/pipe
events andreadable
can't be used together, the latter is ignored.E.g. in this example, there are many
data
events, but noreadable
events (except the last one), so only 1 dot is printed:The same with pipe - only 1 dot even if there are many data chunks:
It is quite visible in the node code why that happens, but I couldn't find any mentions in the docs that "data/pipe" and "readable" are antagonists.
Also, it is not obvious from the common sense standpoint why the examples above don't work "as intended".
Is there a reason for such decision? Anything in the docs about that?
P.S. Node 0.11.14, the stream is
fs.ReadStream
.The text was updated successfully, but these errors were encountered: