diff options
author | Evan Weaver <eweaver@twitter.com> | 2009-01-31 14:38:26 -0800 |
---|---|---|
committer | Evan Weaver <eweaver@twitter.com> | 2009-01-31 14:38:26 -0800 |
commit | 268ea97918026d3f24d1c6e15402812516c92742 (patch) | |
tree | 0945207567d545379acce76ed20e941185016bc3 | |
parent | 46293ab57e1a17dda21d3578b6d678f9ae31096f (diff) | |
download | unicorn-268ea97918026d3f24d1c6e15402812516c92742.tar.gz |
-rw-r--r-- | lib/mongrel.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb index b4d85f4..14cf09f 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -37,7 +37,7 @@ module Mongrel # By default, will return an instance of stdlib's Logger logging to STDERR def logger - @logger ||= Logger.new STDERR + @logger ||= Logger.new(STDERR) end end @@ -52,29 +52,15 @@ module Mongrel attr_accessor :http_body end - + # # This is the main driver of Mongrel, while the Mongrel::HttpParser and Mongrel::URIClassifier # make up the majority of how the server functions. It's a very simple class that just # has a thread accepting connections and a simple HttpServer.process_client function # to do the heavy lifting with the IO and Ruby. # - # You use it by doing the following: - # - # server = HttpServer.new("0.0.0.0", 3000) - # server.register("/stuff", MyNiftyHandler.new) - # server.run.join - # - # The last line can be just server.run if you don't want to join the thread used. - # If you don't though Ruby will mysteriously just exit on you. - # - # Ruby's thread implementation is "interesting" to say the least. Experiments with - # *many* different types of IO processing simply cannot make a dent in it. Future - # releases of Mongrel will find other creative ways to make threads faster, but don't - # hold your breath until Ruby 1.9 is actually finally useful. class HttpServer attr_reader :acceptor attr_reader :workers - attr_reader :classifier attr_reader :host attr_reader :port attr_reader :throttle |