src/Pure/ML-Systems/multithreading.ML
changeset 25775 90525e67ede7
parent 25735 4d147263f71f
child 26074 44c5419cd9f1
     1.1 --- a/src/Pure/ML-Systems/multithreading.ML	Wed Jan 02 16:32:52 2008 +0100
     1.2 +++ b/src/Pure/ML-Systems/multithreading.ML	Wed Jan 02 16:32:53 2008 +0100
     1.3 @@ -18,6 +18,7 @@
     1.4    val tracing: int -> (unit -> string) -> unit
     1.5    val available: bool
     1.6    val max_threads: int ref
     1.7 +  val max_threads_value: unit -> int
     1.8    val self_critical: unit -> bool
     1.9    datatype 'a task =
    1.10      Task of {body: unit -> unit, cont: 'a -> 'a, fail: 'a -> 'a} | Wait | Terminate;
    1.11 @@ -37,6 +38,7 @@
    1.12  
    1.13  val available = false;
    1.14  val max_threads = ref (1: int);
    1.15 +fun max_threads_value () = Int.max (! max_threads, 1);
    1.16  
    1.17  
    1.18  (* critical section *)