projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f624be4
)
doc: stream: clarify meaning of 'drain' some more
author
Ben Noordhuis
<info@bnoordhuis.nl>
Wed, 3 Oct 2012 11:38:03 +0000
(13:38 +0200)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Wed, 3 Oct 2012 11:38:03 +0000
(13:38 +0200)
Courtesy of Lee Coltrane (@coltrane).
doc/api/stream.markdown
patch
|
blob
|
history
diff --git
a/doc/api/stream.markdown
b/doc/api/stream.markdown
index e02765af2f4c460842fe66a610f62758a6a1e9f8..5e0c6f642db77bffa456f7ca3aa5c47639a453e0 100644
(file)
--- a/
doc/api/stream.markdown
+++ b/
doc/api/stream.markdown
@@
-123,6
+123,10
@@
A `Writable Stream` has the following methods, members, and events.
Emitted when the stream's write queue empties and it's safe to write without
buffering again. Listen for it when `stream.write()` returns `false`.
+The `'drain'` event can happen at *any* time, regardless of whether or not
+`stream.write()` has previously returned `false`. To avoid receiving unwanted
+`'drain'` events, listen using `stream.once()`.
+
### Event: 'error'
`function (exception) { }`