diff options
-rw-r--r-- | lib/rack/handler/plum.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/rack/handler/plum.rb b/lib/rack/handler/plum.rb index 97108a8..79cf995 100644 --- a/lib/rack/handler/plum.rb +++ b/lib/rack/handler/plum.rb @@ -15,7 +15,8 @@ module Rack port: opts[:Port].to_i } ], - debug: !!opts[:Debug] + debug: !!opts[:Debug], + threadpool_size: opts[:Threads].to_i ) @server = ::Plum::Rack::Server.new(app, config) @@ -29,9 +30,10 @@ module Rack def self.valid_options { - "Host=HOST" => "Hostname to listen on (default: #{default_options[:Host]})", - "Port=PORT" => "Port to listen on (default: #{default_options[:Port]})", - "Debug" => "Turn on debug mode (default: #{default_options[:Debug]})", + "Host=HOST" => "Hostname to listen on (default: #{default_options[:Host]})", + "Port=PORT" => "Port to listen on (default: #{default_options[:Port]})", + "Debug" => "Turn on debug mode (default: #{default_options[:Debug]})", + "Threads=N" => "Use N threads (default: #{default_options[:Threads]})", } end @@ -43,6 +45,7 @@ module Rack Host: dev ? "localhost" : "0.0.0.0", Port: 8080, Debug: dev, + Threads: 20, } end end |