make double-sure that interrupts are flushed before executing new work (cf. 22f8c2483bd2);
authorwenzelm
Sat, 23 Jul 2011 22:22:21 +0200
changeset 43952 318ca53e3fbb
parent 43951 804783d6ee26
child 43954 521de6ab277a
make double-sure that interrupts are flushed before executing new work (cf. 22f8c2483bd2);
src/Pure/Concurrent/future.ML
--- a/src/Pure/Concurrent/future.ML	Sat Jul 23 21:29:56 2011 +0200
+++ b/src/Pure/Concurrent/future.ML	Sat Jul 23 22:22:21 2011 +0200
@@ -253,7 +253,7 @@
 fun worker_loop name =
   (case SYNCHRONIZED name (fn () => worker_next ()) of
     NONE => ()
-  | SOME work => (execute work; worker_loop name));
+  | SOME work => (Exn.capture Multithreading.interrupted (); execute work; worker_loop name));
 
 fun worker_start name = (*requires SYNCHRONIZED*)
   Unsynchronized.change workers (cons (Simple_Thread.fork false (fn () => worker_loop name),