future scheduler: reduced wait timeout if tasks need to be canceled -- to improve reactivity of interrupts;
--- a/src/Pure/Concurrent/future.ML Mon Mar 23 08:16:24 2009 +0100
+++ b/src/Pure/Concurrent/future.ML Mon Mar 23 11:20:46 2009 +0100
@@ -212,7 +212,8 @@
val _ = if continue then () else scheduler := NONE;
val _ = notify_all ();
- val _ = interruptible (fn () => wait_timeout (Time.fromSeconds 1)) ()
+ val _ = interruptible (fn () =>
+ wait_timeout (Time.fromMilliseconds (if null (! canceled) then 1000 else 50))) ()
handle Exn.Interrupt => List.app do_cancel (Task_Queue.cancel_all (! queue));
in continue end;