equal
deleted
inserted
replaced
174 fun result_commit (Result {commit, ...}) = commit; |
174 fun result_commit (Result {commit, ...}) = commit; |
175 fun result_ord (Result {weight = i, ...}, Result {weight = j, ...}) = int_ord (j, i); |
175 fun result_ord (Result {weight = i, ...}, Result {weight = j, ...}) = int_ord (j, i); |
176 |
176 |
177 fun join_theory (Result {theory, id, ...}) = |
177 fun join_theory (Result {theory, id, ...}) = |
178 Exn.capture Thm.join_theory_proofs theory :: |
178 Exn.capture Thm.join_theory_proofs theory :: |
179 map Exn.Exn (maps Task_Queue.group_status (Goal.peek_futures id)); |
179 map Exn.Exn (maps Task_Queue.group_status (Execution.peek id)); |
180 |
180 |
181 |
181 |
182 datatype task = |
182 datatype task = |
183 Task of string list * (theory list -> result) | |
183 Task of string list * (theory list -> result) | |
184 Finished of theory; |
184 Finished of theory; |
233 (* FIXME more precise commit order (!?) *) |
233 (* FIXME more precise commit order (!?) *) |
234 val results3 = futures |
234 val results3 = futures |
235 |> map (fn future => Exn.capture (fn () => result_commit (Future.join future) ()) ()); |
235 |> map (fn future => Exn.capture (fn () => result_commit (Future.join future) ()) ()); |
236 |
236 |
237 (* FIXME avoid global reset_futures (!??) *) |
237 (* FIXME avoid global reset_futures (!??) *) |
238 val results4 = map Exn.Exn (maps Task_Queue.group_status (Goal.reset_futures ())); |
238 val results4 = map Exn.Exn (maps Task_Queue.group_status (Execution.reset ())); |
239 |
239 |
240 val _ = Par_Exn.release_all (results1 @ results2 @ results3 @ results4); |
240 val _ = Par_Exn.release_all (results1 @ results2 @ results3 @ results4); |
241 in () end); |
241 in () end); |
242 |
242 |
243 in |
243 in |