Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Noting that `stream.pause` is advisory. #2989

Closed
wants to merge 1 commit into from

3 participants

@domenic

This should help save future users much confusion.

See some discussion on the mailing list and, as a bonus, the massive confusion I managed to cause for myself.

I'll go sign that CLA thing.

@domenic domenic Noting that `stream.pause` is advisory.
This should help save future users much confusion.
4ef27e2
@isaacs
Owner

Looks pretty good, but instead of linking to the google groups discussion, can you just add some of the reasoning directly? That thread is pretty long.

@isaacs
Owner

Also: This will be changed in node 0.9.

@domenic

I'd love to do so, but I don't really trust myself to summarize accurately, as I was just introduced to this wild world of streams and buffers within the last week or so. I can try my best (might be fun!), or maybe you or @mikeal could weigh in.

Great to hear this is getting changed before 1.0.

@mikeal

in 0.9 it will not be advisory, it will buffer data.

@domenic domenic closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2012
  1. @domenic

    Noting that `stream.pause` is advisory.

    domenic authored
    This should help save future users much confusion.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 doc/api/stream.markdown
View
5 doc/api/stream.markdown
@@ -57,7 +57,10 @@ Makes the data event emit a string instead of a `Buffer`. `encoding` can be
### stream.pause()
-Pauses the incoming `'data'` events.
+Pauses the incoming `'data'` events. NOTE: this is only advisory; some
+`'data'` events may be emitted before the pausing can actually take place.
+See [this discussion](https://groups.google.com/forum/?fromgroups#!topic/nodejs/yv6Dl-O-wYk)
+for more information.
### stream.resume()
Something went wrong with that request. Please try again.