# HG changeset patch # User wenzelm # Date 1460204489 -7200 # Node ID 9ff9bcbc23410bb9eba3427f466d02e77c582029 # Parent f1bdf10f95d805b57a7413d72e8355becf2b3ff5 virtual Pure is single-threaded to avoid confusion with multiple thread farms etc.; diff -r f1bdf10f95d8 -r 9ff9bcbc2341 src/Pure/Concurrent/multithreading.ML --- a/src/Pure/Concurrent/multithreading.ML Sat Apr 09 14:17:50 2016 +0200 +++ b/src/Pure/Concurrent/multithreading.ML Sat Apr 09 14:21:29 2016 +0200 @@ -31,7 +31,9 @@ | NONE => Thread.numProcessors ()); fun max_threads_result m = - if m > 0 then m else Int.min (Int.max (num_processors (), 1), 8); + if Thread_Data.is_virtual then 1 + else if m > 0 then m + else Int.min (Int.max (num_processors (), 1), 8); val max_threads_state = ref 1;