From 39b178cdebe275cbc8ce19cf269bea7cd15ff4ca Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 4 Jul 2010 22:16:52 +0000 Subject: refactor response body handling for sendfile(2) This hopefully allows the "sendfile" gem to be required anywhere in the Rainbows!/Unicorn config file, and not have to be required via RUBYOPT or the '-r' command-line switch. We also modularize HttpResponse and avoids singleton methods in the response path. This (hopefully) makes it easier for individual concurrency models to share code and override individual methods. --- lib/rainbows/fiber_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/fiber_pool.rb') diff --git a/lib/rainbows/fiber_pool.rb b/lib/rainbows/fiber_pool.rb index 2a1c5f7..745e2a5 100644 --- a/lib/rainbows/fiber_pool.rb +++ b/lib/rainbows/fiber_pool.rb @@ -24,7 +24,7 @@ module Rainbows process_client(::Fiber.yield) while pool << ::Fiber.current }.resume # resume to hit ::Fiber.yield so it waits on a client } - Fiber::Base.const_set(:APP, app) + Fiber::Base.setup(self.class, app) begin schedule do |l| -- cgit v1.2.3-24-ge0c7