【发布时间】:2015-09-21 10:15:01
【问题描述】:
我有下面的例子
const input = _();
const output = _()
.each(x => console.log('out', x));
input
.pipe(output);
input.write(1)
output.destroy();
input.write(2);
据我所知,销毁流的文档 (http://highlandjs.org/#destroy) 应该清理损坏的管道。 相反,我收到以下错误:
out 1
out 2
node_modules/highland/lib/index.js:1114
throw new Error('Can not call next after nil');
^
Error: Can not call next after nil
有没有人了解为什么会发生这种情况,以及销毁流的正确方法是什么?
【问题讨论】: