aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2017-06-03 11:25:42 +0200
committerMatteo Collina <hello@matteocollina.com>2017-06-05 10:19:04 +0200
commit5ca836c192a046d94f28e6f7cb31a3749671624b (patch)
treedf3c77f399c47d4b9aef7197b3121e4a4cb40670
parent0b432e08b167ef7b3304e3cbfa5bfcfb862d185c (diff)
downloadandroid-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>
-rw-r--r--doc/api/stream.md3
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