Files
node/lib
isaacs eafa902632 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
2013-03-28 10:27:18 -07:00
..
2013-02-20 20:34:34 +01:00
2013-03-06 14:31:22 +04:00
2013-02-22 16:30:27 -08:00
2013-01-16 16:53:11 +01:00
2012-06-19 14:07:48 -07:00
2013-03-03 15:28:45 -08:00
2012-06-28 10:14:03 -07:00
2013-03-23 18:46:14 -07:00
2013-02-28 23:11:47 +01:00
2013-03-06 11:44:29 -08:00
2012-03-03 23:48:57 -08:00
2013-03-08 18:56:31 -08:00