SimpleThread.fork: uniform handling of outermost Interrupt, which is not an error and should not produce exception trace;
authorwenzelm
Tue, 27 Oct 2009 11:25:56 +0100
changeset 33220 11a1af478dac
parent 33219 a69147d95957
child 33221 5bb809208876
child 33231 1711610c5b7d
child 33259 2ac8ef0342b4
child 33270 320a1d67b9ae
SimpleThread.fork: uniform handling of outermost Interrupt, which is not an error and should not produce exception trace;
src/HOL/Tools/ATP_Manager/atp_manager.ML
src/HOL/Tools/Nitpick/nitpick_isar.ML
src/Pure/Concurrent/simple_thread.ML
--- a/src/HOL/Tools/ATP_Manager/atp_manager.ML	Tue Oct 27 10:54:25 2009 +0100
+++ b/src/HOL/Tools/ATP_Manager/atp_manager.ML	Tue Oct 27 11:25:56 2009 +0100
@@ -271,7 +271,7 @@
                     Markup.markup Markup.sendback "apply metis")
                 | ERROR msg => (false, "Error: " ^ msg);
             val _ = unregister result (Thread.self ());
-          in () end handle Exn.Interrupt => ())
+          in () end)
       in () end);
 
 
--- a/src/HOL/Tools/Nitpick/nitpick_isar.ML	Tue Oct 27 10:54:25 2009 +0100
+++ b/src/HOL/Tools/Nitpick/nitpick_isar.ML	Tue Oct 27 11:25:56 2009 +0100
@@ -432,7 +432,7 @@
     if auto orelse blocking then
       go ()
     else
-      (SimpleThread.fork true (fn () => (go (); ()) handle Exn.Interrupt => ());
+      (SimpleThread.fork true (fn () => (go (); ()));
        state)
   end
 
--- a/src/Pure/Concurrent/simple_thread.ML	Tue Oct 27 10:54:25 2009 +0100
+++ b/src/Pure/Concurrent/simple_thread.ML	Tue Oct 27 11:25:56 2009 +0100
@@ -15,7 +15,7 @@
 struct
 
 fun fork interrupts body =
-  Thread.fork (fn () => exception_trace (fn () => body ()),
+  Thread.fork (fn () => exception_trace (fn () => body () handle Exn.Interrupt => ()),
     if interrupts then Multithreading.public_interrupts else Multithreading.no_interrupts);
 
 fun interrupt thread = Thread.interrupt thread handle Thread _ => ();