summaryrefslogtreecommitdiff
path: root/doc/api/stream.md
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2017-07-17 10:02:02 +0200
committerMatteo Collina <hello@matteocollina.com>2017-07-19 10:36:10 +0200
commit0e5283b7eda5b22d73c21620a02ac5337f9de9f1 (patch)
treebff7eed95fd0a92b88f521e8fb2a3e6177410185 /doc/api/stream.md
parentd112f5982c9bdb03c4e94262d7d64f67f58d87b2 (diff)
downloadandroid-node-v8-0e5283b7eda5b22d73c21620a02ac5337f9de9f1.tar.gz
android-node-v8-0e5283b7eda5b22d73c21620a02ac5337f9de9f1.tar.bz2
android-node-v8-0e5283b7eda5b22d73c21620a02ac5337f9de9f1.zip
doc,stream: _transform happens one at a time
Add a note to the stream docs specifying that at most a single call to _transform can happen, and the provided callback() should be used to process another chunk. Fixes: https://github.com/nodejs/node/issues/3208 PR-URL: https://github.com/nodejs/node/pull/14321 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r--doc/api/stream.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 042685fd99..5ffa984244 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -2033,6 +2033,10 @@ The `transform._transform()` method is prefixed with an underscore because it
is internal to the class that defines it, and should never be called directly by
user programs.
+`transform._transform()` is never called in parallel; streams implement a
+queue mechanism, and to receive the next chunk, `callback` must be
+called, either synchronously or asychronously.
+
#### Class: stream.PassThrough
The `stream.PassThrough` class is a trivial implementation of a [Transform][]