src/Pure/System/options.scala
changeset 79655 422a6e04cf0f
parent 79526 6e5397fcc41b
child 79656 10e560f2f580
--- a/src/Pure/System/options.scala	Sat Feb 17 21:18:23 2024 +0100
+++ b/src/Pure/System/options.scala	Sat Feb 17 21:21:00 2024 +0100
@@ -399,6 +399,9 @@
 
   def seconds(name: String): Time = Time.seconds(real(name))
 
+  def threads(default: => Int = Multithreading.num_processors()): Int =
+    Multithreading.max_threads(value = int("threads"), default = default)
+
 
   /* external updates */