Skip to content

Commit

Permalink
fix(combine): tiny fixes and perf improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
staltz committed Sep 25, 2016
1 parent 9882e89 commit 9090b59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,21 +335,21 @@ export class CombineListener<T> implements InternalListener<T>, OutSender<Array<

_n(t: T): void {
const p = this.p, out = this.out;
if (!out) return;
if (out === NO) return;
if (p.up(t, this.i)) {
out._n(p.vals);
}
}

_e(err: any): void {
const out = this.out;
if (!out) return;
if (out === NO) return;
out._e(err);
}

_c(): void {
const p = this.p;
if (!p.out) return;
if (p.out === NO) return;
if (--p.Nc === 0) {
p.out._c();
}
Expand Down Expand Up @@ -399,8 +399,9 @@ export class CombineProducer<R> implements Aggregator<any, Array<R>> {
_stop(): void {
const s = this.insArr;
const n = s.length;
const ils = this.ils;
for (let i = 0; i < n; i++) {
s[i]._remove(this.ils[i]);
s[i]._remove(ils[i]);
}
this.out = NO as Stream<Array<R>>;
this.ils = [];
Expand Down

0 comments on commit 9090b59

Please sign in to comment.