Skip to content

Commit acc720b

Browse files
committed
reuse function
1 parent a94d7c0 commit acc720b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

spec/Section 6 -- Execution.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ YieldIncrementalResults(data, errors, incrementalDataRecords):
376376
- Continue to the next completed Pending Incremental Data node.
377377
- Replace {node} in {graph} with a new node corresponding to the Completed
378378
Incremental Data for {result}.
379-
- Add each {incrementalDataRecord} of {incrementalDataRecords} on {result} to
380-
{graph} via the same procedure as above.
379+
- Let {resultIncrementalDataRecords} be {incrementalDataRecords} on {result}.
380+
- Update {graph} to {BuildGraph(resultIncrementalDataRecords, graph)}.
381381
- Let {completedDeferredFragments} be the set of root nodes in {graph} without
382382
any child Pending Data nodes.
383383
- Let {completedIncrementalDataNodes} be the set of completed Incremental Data
@@ -404,17 +404,17 @@ YieldIncrementalResults(data, errors, incrementalDataRecords):
404404
pending)}.
405405
- Complete this incremental result stream.
406406

407-
BuildGraph(incrementalDataRecords):
407+
BuildGraph(incrementalDataRecords, graph):
408408

409-
- Initialize {graph} to an empty directed acyclic graph, where the root nodes
410-
represent the pending Subsequent Results.
409+
- Let {newGraph} be a new directed acyclic graph containing all of the nodes and
410+
edges in {graph}.
411411
- For each {incrementalDataRecord} of {incrementalDataRecords}:
412-
- Add {incrementalDataRecord} to {graph} as a new Pending Data node directed
413-
from the {pendingResults} that it completes, adding each of {pendingResults}
414-
to {graph} as new nodes, if necessary, each directed from its {parent}, if
415-
defined, recursively adding each {parent} as necessary until
416-
{incrementalDataRecord} is connected to {graph}.
417-
- Return {graph}.
412+
- Add {incrementalDataRecord} to {newGraph} as a new Pending Data node
413+
directed from the {pendingResults} that it completes, adding each of
414+
{pendingResults} to {newGraph} as new nodes, if necessary, each directed
415+
from its {parent}, if defined, recursively adding each {parent} as necessary
416+
until {incrementalDataRecord} is connected to {newGraph}.
417+
- Return {newGraph}.
418418

419419
GetNonEmptyNewPending(graph, oldPendingResults):
420420

0 commit comments

Comments
 (0)