Browse Source

Use setImmediate in tail

tags/0.3.1
Lal'C Mellk Mal 7 years ago
parent
commit
cdb329024d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tail.js

+ 2
- 2
tail.js View File

@@ -7,7 +7,7 @@ exports.forEach = function (array, func, callback) {
func(array[i], function (err) {
if (err)
return callback(err);
process.nextTick(step.bind(null, i + 1));
setImmediate(step, i + 1);
});
}
};
@@ -22,7 +22,7 @@ exports.map = function (array, func, callback) {
if (err)
return callback(err);
results.push(res);
process.nextTick(step.bind(null, i + 1));
setImmediate(step, i + 1);
});
}
};

Loading…
Cancel
Save