src/Pure/ML-Systems/multithreading_polyml.ML
changeset 59136 c2b23cb8a677
parent 59054 61b723761dff
child 59180 c0fa3b3bdabd
equal deleted inserted replaced
59135:580de802aafd 59136:c2b23cb8a677
    78 (* options *)
    78 (* options *)
    79 
    79 
    80 val available = true;
    80 val available = true;
    81 
    81 
    82 fun max_threads_result m =
    82 fun max_threads_result m =
    83   if m > 0 then m
    83   if m > 0 then m else Int.min (Int.max (Thread.numProcessors (), 1), 8);
    84   else Int.min (Int.max (Thread.numProcessors (), 1), 8);
       
    85 
    84 
    86 val max_threads = ref 1;
    85 val max_threads = ref 1;
    87 
    86 
    88 fun max_threads_value () = ! max_threads;
    87 fun max_threads_value () = ! max_threads;
    89 
    88