Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: 5ae26f3750f6
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: 929e4d9c9a09
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 28, 2013

  1. stream: Handle late 'readable' event listeners

    In cases where a stream may have data added to the read queue before the
    user adds a 'readable' event, there is never any indication that it's
    time to start reading.
    
    True, there's already data there, which the user would get if they
    checked However, as we use 'readable' event listening as the signal to
    start the flow of data with a read(0) call internally, we ought to
    trigger the same effect (ie, emitting a 'readable' event) even if the
    'readable' listener is added after the first emission.
    
    To avoid confusing weirdness, only the *first* 'readable' event listener
    is granted this privileged status.  After we've started the flow (or,
    alerted the consumer that the flow has started) we don't need to start
    it again.  At that point, it's the consumer's responsibility to consume
    the stream.
    
    Closes #5141
    isaacs committed Mar 28, 2013
    Copy the full SHA
    eafa902 View commit details
    Browse the repository at this point in the history
  2. stream: Emit readable on ended streams via read(0)

    cc: @mjijackson
    isaacs committed Mar 28, 2013
    Copy the full SHA
    929e4d9 View commit details
    Browse the repository at this point in the history