@gmaclennan/parallel-loop
v0.0.2
Published
Loop parallelly
Downloads
2
Readme
parallel-loop
Async parallel loop. See also: limited-parallel-loop serial-loop
Install
$ npm install parallel-loop
Usage
loop = require('parallel-loop')
loop(10, each, function () {
console.log('end')
})
function each (done, i) {
setTimeout(function () {
console.log(i)
done()
}, Math.floor(Math.random() * 500))
})
Will output:
3
9
2
5
7
4
1
8
6
end