diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-12-04 00:58:45 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-12-04 01:03:36 -0800 |
commit | f8ba20423edbe23acb772a9e908d9695ebd92d56 (patch) | |
tree | eddd8aab63d5610bc68ae2889e42fb664e60c046 /lib/rainbows/rev/deferred_response.rb | |
parent | a3df52bd02d9dae07492db6394d574462bd80768 (diff) | |
download | rainbows-f8ba20423edbe23acb772a9e908d9695ebd92d56.tar.gz |
It may make it harder to switch between concurrency models with SIGHUP this way...
Diffstat (limited to 'lib/rainbows/rev/deferred_response.rb')
-rw-r--r-- | lib/rainbows/rev/deferred_response.rb | 8 |
1 files changed, 3 insertions, 5 deletions
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 |