mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Remove unnecessary thread pool size conversions
This commit is contained in:
parent
26c961f1db
commit
54a357470b
2 changed files with 5 additions and 5 deletions
|
@ -178,11 +178,11 @@ module Puma
|
||||||
o.on '-t', '--threads INT', "min:max threads to use (default 0:16)" do |arg|
|
o.on '-t', '--threads INT', "min:max threads to use (default 0:16)" do |arg|
|
||||||
min, max = arg.split(":")
|
min, max = arg.split(":")
|
||||||
if max
|
if max
|
||||||
@options[:min_threads] = min.to_i
|
@options[:min_threads] = min
|
||||||
@options[:max_threads] = max.to_i
|
@options[:max_threads] = max
|
||||||
else
|
else
|
||||||
@options[:min_threads] = 0
|
@options[:min_threads] = 0
|
||||||
@options[:max_threads] = arg.to_i
|
@options[:max_threads] = arg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ module Rack
|
||||||
puts "* Listening on tcp://#{options[:Host]}:#{options[:Port]}"
|
puts "* Listening on tcp://#{options[:Host]}:#{options[:Port]}"
|
||||||
|
|
||||||
server.add_tcp_listener options[:Host], options[:Port]
|
server.add_tcp_listener options[:Host], options[:Port]
|
||||||
server.min_threads = Integer(min)
|
server.min_threads = min
|
||||||
server.max_threads = Integer(max)
|
server.max_threads = max
|
||||||
yield server if block_given?
|
yield server if block_given?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in a new issue