You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|> Array.map (fun dep ->match graph[dep].PartialResult with Some result -> result | None -> failwith $"Unexpected lack of result for a dependency {idx} -> {dep}")
95
+
|> Array.fold (fun state item -> state + item)""
96
+
letthisResult= idx.ToString()
97
+
$"{thisResult}"
87
98
88
99
// Processing of a single node/file - gives a result
89
100
letgo(idx :int)=
90
101
letnode= graph[idx]
91
102
printfn $"Start {idx} -> %+A{node.Deps}"
92
103
Thread.Sleep(500)
93
104
letres= actualWork idx
94
-
node.Result<- Some res
95
-
printfn $" Stop {idx} work"
105
+
node.PartialResult<- Some res
106
+
printfn $" Stop {idx} work - result {res}"
96
107
97
108
// Increment processed deps count for all dependants and schedule those who are now unblocked
98
109
node.Dependants
@@ -133,5 +144,10 @@ let runGrapher () =
133
144
q.CompleteAdding()
134
145
printfn "waitall"
135
146
Task.WaitAll workers
136
-
printfn "End"
137
-
()
147
+
148
+
letfullResult=
149
+
graph
150
+
|> Seq.map (fun(KeyValue(idx,node))-> node.PartialResult |> Option.get)// TODO Oops
0 commit comments