about summary refs log tree commit homepage
path: root/lib/rainbows/ev_core.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-20 20:32:24 +0000
committerEric Wong <normalperson@yhbt.net>2011-01-20 20:32:24 +0000
commit7ad4e300c29b06fd53aca9f9bad18f97f9a34633 (patch)
tree4d04679ace5f876e642b6b091deb18025b10c9d1 /lib/rainbows/ev_core.rb
parent72cbecfe01b8c4b2c7bb7e362401805374036dc2 (diff)
downloadrainbows-7ad4e300c29b06fd53aca9f9bad18f97f9a34633.tar.gz
ev_core is always loaded after forking, so eliminate the
need for extra setup steps for each concurrency model that
uses it
Diffstat (limited to 'lib/rainbows/ev_core.rb')
-rw-r--r--lib/rainbows/ev_core.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb
index d218553..8d3511a 100644
--- a/lib/rainbows/ev_core.rb
+++ b/lib/rainbows/ev_core.rb
@@ -125,6 +125,7 @@ module Rainbows::EvCore
   end
 
   TmpIO = Unicorn::TmpIO
+  CBB = Unicorn::TeeInput.client_body_buffer_size
 
   def io_for(bytes)
     bytes <= CBB ? StringIO.new("") : TmpIO.new
@@ -142,8 +143,4 @@ module Rainbows::EvCore
       max ? CapInput.new(io_for(max), self, max) : TmpIO.new
     end
   end
-
-  def self.setup
-    const_set :CBB, Unicorn::TeeInput.client_body_buffer_size
-  end
 end