<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node.git/test/simple/test-stream2-transform.js, branch move-debugger-tests</title>
<subtitle>github.com: joyent/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/'/>
<entry>
<title>streams: Don't emit 'end' until read() past EOF</title>
<updated>2013-07-25T20:14:49+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-07-24T23:05:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=993bb93e0a58279bba482c40da9a114cfd467f55'/>
<id>993bb93e0a58279bba482c40da9a114cfd467f55</id>
<content type='text'>
This prevents the following sort of thing from being confusing:

```javascript
stream.on('data', function() { console.error('got data'); });
stream.pause(); // stop reading

// turns out no data is available
stream.push(null);

// Hand the stream to someone else, who does stuff...
setTimeout(function() {
  // too late! 'end' is already emitted!
  stream.on('end', function() { console.error('got end'); });
});
```

With this change, the `end` event is not emitted until you call `read()`
*past* the EOF null.  So, a paused stream will not swallow the `end`
event and emit it before you `resume()` the stream.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This prevents the following sort of thing from being confusing:

```javascript
stream.on('data', function() { console.error('got data'); });
stream.pause(); // stop reading

// turns out no data is available
stream.push(null);

// Hand the stream to someone else, who does stuff...
setTimeout(function() {
  // too late! 'end' is already emitted!
  stream.on('end', function() { console.error('got end'); });
});
```

With this change, the `end` event is not emitted until you call `read()`
*past* the EOF null.  So, a paused stream will not swallow the `end`
event and emit it before you `resume()` the stream.
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: Simplify flowing, passive data listening</title>
<updated>2013-07-22T23:17:30+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-07-18T01:24:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=0f8de5e1f96a07fa6de837378d29ac5f2719ec60'/>
<id>0f8de5e1f96a07fa6de837378d29ac5f2719ec60</id>
<content type='text'>
Closes #5860

In streams2, there is an "old mode" for compatibility.  Once switched
into this mode, there is no going back.

With this change, there is a "flowing mode" and a "paused mode".  If you
add a data listener, then this will start the flow of data.  However,
hitting the `pause()` method will switch *back* into a non-flowing mode,
where the `read()` method will pull data out.

Every time `read()` returns a data chunk, it also emits a `data` event.
In this way, a passive data listener can be added, and the stream passed
off to some other reader, for use with progress bars and the like.

There is no API change beyond this added flexibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #5860

In streams2, there is an "old mode" for compatibility.  Once switched
into this mode, there is no going back.

With this change, there is a "flowing mode" and a "paused mode".  If you
add a data listener, then this will start the flow of data.  However,
hitting the `pause()` method will switch *back* into a non-flowing mode,
where the `read()` method will pull data out.

Every time `read()` returns a data chunk, it also emits a `data` event.
In this way, a passive data listener can be added, and the stream passed
off to some other reader, for use with progress bars and the like.

There is no API change beyond this added flexibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: objectMode transform should allow falsey values</title>
<updated>2013-07-03T22:07:01+00:00</updated>
<author>
<name>Jeff Barczewski</name>
<email>jeff.barczewski@gmail.com</email>
</author>
<published>2013-03-31T03:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=26ca7d73ca9c45112f33579aa5a1293059010779'/>
<id>26ca7d73ca9c45112f33579aa5a1293059010779</id>
<content type='text'>
If a transform stream has objectMode = true, it should
allow falsey values other than (null) like 0, false, ''.

null is reserved to indicate stream eof but other falsey
values should flow through properly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a transform stream has objectMode = true, it should
allow falsey values other than (null) like 0, false, ''.

null is reserved to indicate stream eof but other falsey
values should flow through properly.
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: Fix stall in Transform under very specific conditions</title>
<updated>2013-03-22T00:49:12+00:00</updated>
<author>
<name>Gil Pedersen</name>
<email>git@gpost.dk</email>
</author>
<published>2013-03-17T14:04:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=c3aae9cf95749949194f5288bad7468a995b1162'/>
<id>c3aae9cf95749949194f5288bad7468a995b1162</id>
<content type='text'>
The stall is exposed in the test, though the test itself asserts before
it stalls.

The test is constructed to replicate the stalling state of a complex
Passthrough usecase since I was not able to reliable trigger the stall.

Some of the preconditions for triggering the stall are:
  * rs.length &gt;= rs.highWaterMark
  * !rs.needReadable
  * _transform() handler that can return empty transforms
  * multiple sync write() calls

Combined this can trigger a case where rs.reading is not cleared when
further progress requires this. The fix is to always clear rs.reading.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The stall is exposed in the test, though the test itself asserts before
it stalls.

The test is constructed to replicate the stalling state of a complex
Passthrough usecase since I was not able to reliable trigger the stall.

Some of the preconditions for triggering the stall are:
  * rs.length &gt;= rs.highWaterMark
  * !rs.needReadable
  * _transform() handler that can return empty transforms
  * multiple sync write() calls

Combined this can trigger a case where rs.reading is not cleared when
further progress requires this. The fix is to always clear rs.reading.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Make stream2-transform less timing-dependent</title>
<updated>2013-03-09T02:56:31+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-03-07T22:28:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=08f5db112f9e35160bd8b639782ec33f003fb1bd'/>
<id>08f5db112f9e35160bd8b639782ec33f003fb1bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: Use class for write buffer entries</title>
<updated>2013-03-05T22:27:16+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-03-04T03:43:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=312289b791a5924eec5748fbd19ad6867ff37320'/>
<id>312289b791a5924eec5748fbd19ad6867ff37320</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: _write takes an encoding argument</title>
<updated>2013-03-05T22:27:15+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-03-04T03:14:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=426b4c625802c7b6913fa09237aa9745bf3ae84a'/>
<id>426b4c625802c7b6913fa09237aa9745bf3ae84a</id>
<content type='text'>
This vastly reduces the overhead of decodeStrings:false streams,
such as net and http.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This vastly reduces the overhead of decodeStrings:false streams,
such as net and http.
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: Remove output function from _transform</title>
<updated>2013-03-05T22:27:15+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-03-04T03:05:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=cd68d86c3283af2f4b3c349c2081c609e3978b9b'/>
<id>cd68d86c3283af2f4b3c349c2081c609e3978b9b</id>
<content type='text'>
Just use stream.push(outputChunk) instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just use stream.push(outputChunk) instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: remove lowWaterMark feature</title>
<updated>2013-02-21T23:23:18+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-02-21T18:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=3b2e9d26480da0c73a3735314bee5910cb3844ab'/>
<id>3b2e9d26480da0c73a3735314bee5910cb3844ab</id>
<content type='text'>
It seems like a good idea on the face of it, but lowWaterMarks are
actually not useful, and in practice should always be set to zero.

It would be worthwhile for writers if we actually did some kind of
writev() type of thing, but actually this just delays calling write()
and the overhead of doing a bunch of Buffer copies is not worth the
slight benefit of calling write() fewer times.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems like a good idea on the face of it, but lowWaterMarks are
actually not useful, and in practice should always be set to zero.

It would be worthwhile for writers if we actually did some kind of
writev() type of thing, but actually this just delays calling write()
and the overhead of doing a bunch of Buffer copies is not worth the
slight benefit of calling write() fewer times.
</pre>
</div>
</content>
</entry>
<entry>
<title>stream: Correct Transform class backpressure</title>
<updated>2013-01-28T16:40:45+00:00</updated>
<author>
<name>isaacs</name>
<email>i@izs.me</email>
</author>
<published>2013-01-27T19:56:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=e26622bd18fc86033cea393125cad49c577b524b'/>
<id>e26622bd18fc86033cea393125cad49c577b524b</id>
<content type='text'>
The refactor in b43e544140ccf68580c02e71c56d19b82e1e1d32 to use
stream.push() in Transform inadvertently caused it to immediately
consume all the written data, regardless of whether or not the readable
side was being consumed.

Only pull data through the _transform() process when the readable side
is being consumed.

Fix #4667
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The refactor in b43e544140ccf68580c02e71c56d19b82e1e1d32 to use
stream.push() in Transform inadvertently caused it to immediately
consume all the written data, regardless of whether or not the readable
side was being consumed.

Only pull data through the _transform() process when the readable side
is being consumed.

Fix #4667
</pre>
</div>
</content>
</entry>
</feed>
