mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: change from setTimeout to setImmediate
This is a part of Code And Learn at NodeFest 2016 Challenge Fixes: https://github.com/nodejs/code-and-learn/issues/58 PR-URL: https://github.com/nodejs/node/pull/9578 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
eca12d4316
commit
b87fe250d2
1 file changed
+1
-1
@@ -12,7 +12,7 @@ var chunk = new Buffer(10);
|
||||
chunk.fill('x');
|
||||
|
||||
r._read = function(n) {
|
||||
setTimeout(function() {
|
||||
setImmediate(function() {
|
||||
r.push(--nChunks === 0 ? null : chunk);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user