--- a/src/Pure/ML-Systems/multithreading_polyml.ML Tue Jul 31 23:23:34 2007 +0200
+++ b/src/Pure/ML-Systems/multithreading_polyml.ML Wed Aug 01 16:48:47 2007 +0200
@@ -137,10 +137,9 @@
| Exn.Exn exn =>
(PROTECTED "status" (fn () => status := exn :: ! status); continue cont))
| (Task.Finished, _) =>
- (PROTECTED "running" (fn () => (dec active; dec running));
- wakeup_all ()))
+ (PROTECTED "running" (fn () => (dec active; dec running; wakeup_all ()))))
and continue cont =
- (PROTECTED "cont" (fn () => queue := cont (! queue)); wakeup_all; work ());
+ (PROTECTED "cont" (fn () => queue := cont (! queue); wakeup_all ()); work ());
(*main control: fork and wait*)
fun fork 0 = ()