diff options
author | Matteo Collina <hello@matteocollina.com> | 2017-06-03 11:25:42 +0200 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2017-06-05 10:19:04 +0200 |
commit | 5ca836c192a046d94f28e6f7cb31a3749671624b (patch) | |
tree | df3c77f399c47d4b9aef7197b3121e4a4cb40670 /doc/api/stream.md | |
parent | 0b432e08b167ef7b3304e3cbfa5bfcfb862d185c (diff) | |
download | android-node-v8-5ca836c192a046d94f28e6f7cb31a3749671624b.tar.gz android-node-v8-5ca836c192a046d94f28e6f7cb31a3749671624b.tar.bz2 android-node-v8-5ca836c192a046d94f28e6f7cb31a3749671624b.zip |
doc,stream: clarify 'data', pipe() and 'readable'
We stated that 'data' and pipe() are preferred over 'readable'.
This commit clarifies that 'data' and pipe() are easier to understand,
but 'readable' might result in increased throughput.
Fixes: https://github.com/nodejs/node/issues/11587
PR-URL: https://github.com/nodejs/node/pull/13432
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r-- | doc/api/stream.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 3836056d81..ca37243c90 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -768,7 +768,8 @@ end ``` *Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are -preferred over the use of the `'readable'` event. +easier to understand than the `'readable'` event. +However, handling `'readable'` might result in increased throughput. ##### readable.isPaused() <!-- YAML |