class Puma::DSL
def threads(min, max)
@example
threads 0, 16
@example
If these environment variables aren't set, the default is "0, 5" in MRI or "0, 16" for other interpreters.
(or +MIN_THREADS+ / +MAX_THREADS+ if the +PUMA_+ variables aren't set).
The default is the environment variables +PUMA_MIN_THREADS+ / +PUMA_MAX_THREADS+
requests and +max+ the maximum.
Configure +min+ to be the minimum number of threads to use to answer
def threads(min, max) min = Integer(min) max = Integer(max) if min > max raise "The minimum (#{min}) number of threads must be less than or equal to the max (#{max})" end if max < 1 raise "The maximum number of threads (#{max}) must be greater than 0" end @options[:min_threads] = min @options[:max_threads] = max end