equal
deleted
inserted
replaced
98 val _ = Exn.capture (fn () => Future.fulfill_result x res0) (); |
98 val _ = Exn.capture (fn () => Future.fulfill_result x res0) (); |
99 val res = Future.join_result x; |
99 val res = Future.join_result x; |
100 (*semantic race: some other threads might see the same |
100 (*semantic race: some other threads might see the same |
101 interrupt, until there is a fresh start*) |
101 interrupt, until there is a fresh start*) |
102 val _ = |
102 val _ = |
103 if Exn.is_interrupt_exn res then |
103 if Exn.is_interrupt_exn res |
104 Synchronized.change var (fn _ => Expr (name, e)) |
104 then Synchronized.change var (fn _ => Expr (name, e)) |
105 else (); |
105 else Synchronized.change var (fn _ => Result (Future.value_result res)); |
106 in res end |
106 in res end |
107 | NONE => Exn.capture (restore_attributes (fn () => Future.join x)) ()) |
107 | NONE => Exn.capture (restore_attributes (fn () => Future.join x)) ()) |
108 end) ()); |
108 end) ()); |
109 |
109 |
110 end; |
110 end; |