src/Pure/ML-Systems/multithreading_polyml.ML
changeset 25775 90525e67ede7
parent 25735 4d147263f71f
child 26074 44c5419cd9f1
     1.1 --- a/src/Pure/ML-Systems/multithreading_polyml.ML	Wed Jan 02 16:32:52 2008 +0100
     1.2 +++ b/src/Pure/ML-Systems/multithreading_polyml.ML	Wed Jan 02 16:32:53 2008 +0100
     1.3 @@ -38,8 +38,13 @@
     1.4    else ();
     1.5  
     1.6  val available = true;
     1.7 +
     1.8  val max_threads = ref 1;
     1.9  
    1.10 +fun max_threads_value () =
    1.11 +  let val m = ! max_threads
    1.12 +  in if m <= 0 then Thread.numProcessors () else m end;
    1.13 +
    1.14  
    1.15  (* misc utils *)
    1.16