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