securityos/node_modules/seq/examples/join.js

19 lines
443 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
var Seq = require('seq');
Seq()
.par(function () {
var that = this;
setTimeout(function () { that(null, 'a') }, 300);
})
.par(function () {
var that = this;
setTimeout(function () { that(null, 'b') }, 200);
})
.par(function () {
var that = this;
setTimeout(function () { that(null, 'c') }, 100);
})
.seq(function (a, b, c) {
console.dir([ a, b, c ])
})
;