Skip to content

Commit

Permalink
polish(incremental): 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 14, 2024
1 parent ab52e2f commit 5c7d4d1
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 5c7d4d1

Please sign in to comment.