taskflows
v1.0.0
Published
Scalable async taskflow engine
Downloads
2
Readme
TaskFlows
Scalable Promise / semaphore manager & task sequencer
Minimal Examples
As simple semaphore
var s = new taskflow().then(callback);
rows.forEach(function ( row ) {
s.wait();
doSomething(row, s.release);
});
s.run();
As task flow
var scope = {rows : []},
flow = new taskflow(
[
( scope, flow )=> {
return [async1, async2, async3]
},
( scope, flow )=> {
scope.rows.forEach(function ( row ) {
flow.wait();
doSomething(row, flow.release);
});
}
],
scope
).then(callback).run();