equal
deleted
inserted
replaced
127 fun consolidate xs = |
127 fun consolidate xs = |
128 let |
128 let |
129 val pending = |
129 val pending = |
130 xs |> map_filter (fn x => if is_pending x then SOME (fn () => force_result x) else NONE); |
130 xs |> map_filter (fn x => if is_pending x then SOME (fn () => force_result x) else NONE); |
131 val _ = |
131 val _ = |
132 if Multithreading.relevant pending then |
132 if Future.relevant pending then |
133 ignore (Future.forked_results {name = "Lazy.consolidate", deps = []} pending) |
133 ignore (Future.forked_results {name = "Lazy.consolidate", deps = []} pending) |
134 else List.app (fn e => ignore (e ())) pending; |
134 else List.app (fn e => ignore (e ())) pending; |
135 in xs end; |
135 in xs end; |
136 |
136 |
137 |
137 |