diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-10 08:04:48 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-10 08:04:48 +0000 |
commit | d3b97d1114e2d23a9231fe889cd5bf6927d451ba (patch) | |
tree | 6c4d7a033dad1edc91b72a9e7fa36203c60c8116 /lib/rainbows/never_block.rb | |
parent | 9838b614621bbbff27a91166406d833be85adbbd (diff) | |
download | rainbows-d3b97d1114e2d23a9231fe889cd5bf6927d451ba.tar.gz |
Since we suck at building websites, we just rely on RDoc as a website builder. And since Rainbows! is an application server (and not a programming library), our internal API should be of little interest to end users. Anybody interested in Rainbows! (or any other project) internals should be reading the source.
Diffstat (limited to 'lib/rainbows/never_block.rb')
-rw-r--r-- | lib/rainbows/never_block.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/rainbows/never_block.rb b/lib/rainbows/never_block.rb index 06bb496..9f050a5 100644 --- a/lib/rainbows/never_block.rb +++ b/lib/rainbows/never_block.rb @@ -18,13 +18,14 @@ module Rainbows # module NeverBlock + # :stopdoc: DEFAULTS = { :pool_size => 20, # same default size used by NB :backend => :EventMachine, # NeverBlock doesn't support Rev yet } # same pool size NB core itself uses - def self.setup + def self.setup # :nodoc: DEFAULTS.each { |k,v| O[k] ||= v } Integer === O[:pool_size] && O[:pool_size] > 0 or raise ArgumentError, "pool_size must a be an Integer > 0" @@ -34,7 +35,7 @@ module Rainbows G.server.extend(Core) end - module Core + module Core # :nodoc: all def self.setup self.const_set(:POOL, ::NB::Pool::FiberPool.new(O[:pool_size])) base = O[:backend].to_s.gsub!(/([a-z])([A-Z])/, '\1_\2').downcase! @@ -57,9 +58,7 @@ module Rainbows end end end - end - module Core def init_worker_process(worker) super Core.setup @@ -67,5 +66,7 @@ module Rainbows end end + # :startdoc: + end end |