Skip to content

Commit 587589c

Browse files
committed
reuse function
1 parent bfe47f3 commit 587589c

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
@@ -373,8 +373,8 @@ YieldIncrementalResults(data, errors, incrementalDataRecords):
373373
- Continue to the next completed Pending Incremental Data node.
374374
- Replace {node} in {graph} with a new node corresponding to the Completed
375375
Incremental Data for {result}.
376-
- Add each {incrementalDataRecord} of {incrementalDataRecords} on {result} to
377-
{graph} via the same procedure as above.
376+
- Let {resultIncrementalDataRecords} be {incrementalDataRecords} on {result}.
377+
- Update {graph} to {BuildGraph(resultIncrementalDataRecords, graph)}.
378378
- Let {completedDeferredFragments} be the set of root nodes in {graph} without
379379
any child Pending Data nodes.
380380
- Let {completedIncrementalDataNodes} be the set of completed Incremental Data
@@ -401,17 +401,17 @@ YieldIncrementalResults(data, errors, incrementalDataRecords):
401401
pending)}.
402402
- Complete this incremental result stream.
403403

404-
BuildGraph(incrementalDataRecords):
404+
BuildGraph(incrementalDataRecords, graph):
405405

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

416416
GetNonEmptyNewPending(graph, oldPendingResults):
417417

0 commit comments

Comments
 (0)