diff -r 981cd49a3f90 -r 65ef68bab8d6 src/Pure/Concurrent/multithreading.scala --- a/src/Pure/Concurrent/multithreading.scala Sat Feb 17 17:12:37 2024 +0100 +++ b/src/Pure/Concurrent/multithreading.scala Sat Feb 17 17:23:22 2024 +0100 @@ -42,8 +42,10 @@ /* max_threads */ - def max_threads(): Int = { - val m = Value.Int.unapply(System.getProperty("isabelle.threads", "0")) getOrElse 0 - if (m > 0) m else num_processors() min 8 + def max_threads( + value: Int = Value.Int.unapply(System.getProperty("isabelle.threads", "0")) getOrElse 0, + default: => Int = num_processors() + ): Int = { + if (value > 0) value else (default max 1) min 8 } }