我正在尝试在 nodejs 中实现流的并行化,以下代码在管道中添加并行方法时终止。
let x = [1,2,3,4,5] highland(x) .map(t => t*2) .parallel(2) .each(t => console.log(t)) .done(()=> console.log('DONE'))
错误 :
Uncaught Error: Expected Stream, got number
使用 highlandjs 实现并行化的正确方法是什么?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句