src/Pure/Concurrent/future.ML
changeset 32109 ff3677972e3f
parent 32107 47d0da617fcc
child 32186 8026b73cd357
equal deleted inserted replaced
32108:77094a0bbc3e 32109:ff3677972e3f
   159     val result = ref (NONE: 'a Exn.result option);
   159     val result = ref (NONE: 'a Exn.result option);
   160     fun job ok =
   160     fun job ok =
   161       let
   161       let
   162         val res =
   162         val res =
   163           if ok then
   163           if ok then
   164             Multithreading.with_attributes Multithreading.restricted_interrupts
   164             Exn.capture
   165               (fn _ => fn () => Exn.capture e ()) ()
   165               (Multithreading.with_attributes Multithreading.restricted_interrupts
       
   166                 (fn _ => fn () => e ())) ()
   166           else Exn.Exn Exn.Interrupt;
   167           else Exn.Exn Exn.Interrupt;
   167         val _ = result := SOME res;
   168         val _ = result := SOME res;
   168       in
   169       in
   169         (case res of
   170         (case res of
   170           Exn.Exn exn => (Task_Queue.cancel_group group exn; false)
   171           Exn.Exn exn => (Task_Queue.cancel_group group exn; false)