-
-
Save TooTallNate/ded5ae3e335d0c487895 to your computer and use it in GitHub Desktop.
readable's "lowWaterMark" should be filled, even without a .read() call...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Readable = require('stream').Readable; | |
// node v0.8.x compat | |
if (!Readable) Readable = require('readable-stream/readable'); | |
var r = new Readable({ lowWaterMark: 1024 }); | |
r._read = function (b, fn) { | |
console.error('_read(%d bytes)', b); | |
}; | |
// this shouldn't even be necessary... | |
setTimeout(function () { }, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment