Skip to content

Commit

Permalink
remove unnecessary helper
Browse files Browse the repository at this point in the history
improves readability at the cost of pushing and then immediate popping
  • Loading branch information
yaacovCR committed Aug 11, 2024
1 parent 0b85d66 commit 04256f6
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/execution/IncrementalGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,12 @@ export class IncrementalGraph {
}
}

private *_yieldCurrentCompletedIncrementalData(
first: IncrementalDataRecordResult,
): Generator<IncrementalDataRecordResult> {
yield first;
yield* this.currentCompletedBatch();
}

private _enqueue(completed: IncrementalDataRecordResult): void {
this._completedQueue.push(completed);
const next = this._nextQueue.shift();
if (next !== undefined) {
next(this._yieldCurrentCompletedIncrementalData(completed));
if (next === undefined) {
return;
}
this._completedQueue.push(completed);
next(this.currentCompletedBatch());
}
}

0 comments on commit 04256f6

Please sign in to comment.