-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
- README的Parallel例子里面,这里ep是是个函数,没有on方法,这里应该是ep([...])这个返回值吧?
ep = require('event-pipe');
ep.on('drain', function(){
console.log('all done');
})
ep([function(){....
- 还是关于并行的一个问题,比如我同时跑两个异步任务,container执行方法,在外部调用run的时候跑了一次,pointer+1,第一个异步任务结束,调一次container,pointer+1,此时pointer = 2 >= list.length,于是,这时候就触发了drain事件,然后第二个任务跑完,再调了一次container,pointer+1,此时因为之前触发drain事件的时候return掉了pointer依然 = 2,pointer = 2 >= list.length依旧成立,再次触发drain事件,请问下,这个是我调用方式错误,还是代码本身存在问题呢?
非常感谢。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels