From f8ba20423edbe23acb772a9e908d9695ebd92d56 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 4 Dec 2009 00:58:45 -0800 Subject: rev: do not initialize a Rev::Loop in master process It may make it harder to switch between concurrency models with SIGHUP this way... --- lib/rainbows/rev/deferred_response.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/rainbows/rev/deferred_response.rb') diff --git a/lib/rainbows/rev/deferred_response.rb b/lib/rainbows/rev/deferred_response.rb index 9c3c27f..b69c7be 100644 --- a/lib/rainbows/rev/deferred_response.rb +++ b/lib/rainbows/rev/deferred_response.rb @@ -10,10 +10,6 @@ module Rainbows G = Rainbows::G HH = Rack::Utils::HeaderHash - # we only want to attach to the Rev::Loop belonging to the - # main thread in Ruby 1.9 - LOOP = ::Rev::Loop.default - def self.defer!(client, response, out) body = response.last headers = HH.new(response[1]) @@ -36,7 +32,9 @@ module Rainbows out[0] = CONN_CLOSE end - io = new(io, client, do_chunk, body).attach(LOOP) + # we only want to attach to the Rev::Loop belonging to the + # main thread in Ruby 1.9 + io = new(io, client, do_chunk, body).attach(Server::LOOP) elsif st.file? headers.delete('Transfer-Encoding') headers['Content-Length'] ||= st.size.to_s -- cgit v1.2.3-24-ge0c7