Laze.force_result: more robust treatment of interrupts stemming from peer group cancellation;
--- a/src/Pure/Concurrent/lazy.ML Thu Nov 11 19:58:07 2010 +0100
+++ b/src/Pure/Concurrent/lazy.ML Fri Nov 12 10:58:09 2010 +0100
@@ -55,8 +55,9 @@
(case expr of
SOME e =>
let
- val res = restore_interrupts (fn () => Exn.capture e ()) ();
- val _ = Future.fulfill_result x res;
+ val res0 = restore_interrupts (fn () => Exn.capture e ()) ();
+ val _ = Future.fulfill_result x res0;
+ val res = Future.join_result x;
(*semantic race: some other threads might see the same
interrupt, until there is a fresh start*)
val _ =