node-stepify icon indicating copy to clipboard operation
node-stepify copied to clipboard

如果task是动态添加的,如何让所有task同时运行?

Open cos800 opened this issue 11 years ago • 0 comments

    var workflow = Stepify().debug(true);

    for (i=0; i<10; i++) {
        workflow.step(function(){
            var root = this;
            root.next();
        }).pend();
    }
    workflow.run();

这样子的话 是一个个按顺序的执行,

另外,为什么 task 不是默认并行的呢? step已经是异步了,为什么 task 还是默认异步。。。

cos800 avatar Oct 17 '14 03:10 cos800