# HG changeset patch # User wenzelm # Date 1221682012 -7200 # Node ID fbc7078112032c511386ba5b4b661855a0b2fe5a # Parent 8dab53900e8ca3255eb1e919b64560017a74dc11 shutdown only if Multithreading.available; diff -r 8dab53900e8c -r fbc707811203 src/Pure/Concurrent/future.ML --- a/src/Pure/Concurrent/future.ML Wed Sep 17 21:27:44 2008 +0200 +++ b/src/Pure/Concurrent/future.ML Wed Sep 17 22:06:52 2008 +0200 @@ -281,13 +281,15 @@ (*global join and shutdown*) fun shutdown () = - (scheduler_check (); - SYNCHRONIZED "shutdown" (fn () => - (while not (scheduler_active ()) do wait "shutdown: scheduler inactive"; - while not (TaskQueue.is_empty (! queue)) do wait "shutdown: join"; - do_shutdown := true; - notify_all (); - while not (null (! workers)) do wait "shutdown: workers"; - while scheduler_active () do wait "shutdown: scheduler still active"))); + if Multithreading.available then + (scheduler_check (); + SYNCHRONIZED "shutdown" (fn () => + (while not (scheduler_active ()) do wait "shutdown: scheduler inactive"; + while not (TaskQueue.is_empty (! queue)) do wait "shutdown: join"; + do_shutdown := true; + notify_all (); + while not (null (! workers)) do wait "shutdown: workers"; + while scheduler_active () do wait "shutdown: scheduler still active"))) + else (); end;