about summary refs log tree commit homepage
path: root/lib/rainbows/rev/thread_client.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-28 17:59:27 -0800
committerEric Wong <normalperson@yhbt.net>2010-12-28 18:00:04 -0800
commit40445641f11f01c6a24bf96c8b80eed5fd33a512 (patch)
tree57a7652cc03f46407d51babfd04d72d1c401ac99 /lib/rainbows/rev/thread_client.rb
parent3495d59763e6159975debf32728dc53fc41c5ea1 (diff)
downloadrainbows-40445641f11f01c6a24bf96c8b80eed5fd33a512.tar.gz
complete Rev => Coolio renaming
We use Cool.io internally everywhere now, but preserve
Rev-based models for anybody using them.
Diffstat (limited to 'lib/rainbows/rev/thread_client.rb')
-rw-r--r--lib/rainbows/rev/thread_client.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/rainbows/rev/thread_client.rb b/lib/rainbows/rev/thread_client.rb
deleted file mode 100644
index d6e6655..0000000
--- a/lib/rainbows/rev/thread_client.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- encoding: binary -*-
-# :enddoc:
-
-RUBY_VERSION =~ %r{\A1\.8} and
-  warn "Rev and Threads do not mix well under Ruby 1.8"
-
-class Rainbows::Rev::ThreadClient < Rainbows::Rev::Client
-  def app_call
-    KATO.delete(self)
-    disable if enabled?
-    @env[RACK_INPUT] = @input
-    app_dispatch # must be implemented by subclass
-  end
-
-  # this is only called in the master thread
-  def response_write(response)
-    alive = @hp.next? && G.alive
-    rev_write_response(response, alive)
-    return quit unless alive && :close != @state
-
-    @state = :headers
-  end
-
-  # fails-safe application dispatch, we absolutely cannot
-  # afford to fail or raise an exception (killing the thread)
-  # here because that could cause a deadlock and we'd leak FDs
-  def app_response
-    begin
-      @env[REMOTE_ADDR] = @_io.kgio_addr
-      APP.call(@env.update(RACK_DEFAULTS))
-    rescue => e
-      Rainbows::Error.app(e) # we guarantee this does not raise
-      [ 500, {}, [] ]
-    end
-  end
-end