about summary refs log tree commit homepage
path: root/lib/rainbows/rev.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-26 03:00:11 +0000
committerEric Wong <normalperson@yhbt.net>2010-12-26 03:03:03 +0000
commita35fd37ff0c81ca8130c18b7b77957bafe686f83 (patch)
tree08612254940bab7b87b9746c8b5a83f7faae6a45 /lib/rainbows/rev.rb
parent43e3d3f7a8dd2b184c8485469c2acff3dac34009 (diff)
downloadrainbows-a35fd37ff0c81ca8130c18b7b77957bafe686f83.tar.gz
Deferred* classes will get loaded anyways since
Rainbows::Rev::Client hit them in case statements.
Diffstat (limited to 'lib/rainbows/rev.rb')
-rw-r--r--lib/rainbows/rev.rb65
1 files changed, 31 insertions, 34 deletions
diff --git a/lib/rainbows/rev.rb b/lib/rainbows/rev.rb
index 1ee705c..71bcfcc 100644
--- a/lib/rainbows/rev.rb
+++ b/lib/rainbows/rev.rb
@@ -2,43 +2,40 @@
 require 'rainbows/rev/core'
 require 'rainbows/rev/client'
 
-module Rainbows
+# Implements a basic single-threaded event model with
+# {Rev}[http://rev.rubyforge.org/].  It is capable of handling
+# thousands of simultaneous client connections, but with only a
+# single-threaded app dispatch.  It is suited for slow clients and
+# fast applications (applications that do not have slow network
+# dependencies) or applications that use DevFdResponse for deferrable
+# response bodies.  It does not require your Rack application to be
+# thread-safe, reentrancy is only required for the DevFdResponse body
+# generator.
+#
+# Compatibility: Whatever \Rev itself supports, currently Ruby
+# 1.8/1.9.
+#
+# This model does not implement as streaming "rack.input" which
+# allows the Rack application to process data as it arrives.  This
+# means "rack.input" will be fully buffered in memory or to a
+# temporary file before the application is entered.
 
-  # Implements a basic single-threaded event model with
-  # {Rev}[http://rev.rubyforge.org/].  It is capable of handling
-  # thousands of simultaneous client connections, but with only a
-  # single-threaded app dispatch.  It is suited for slow clients and
-  # fast applications (applications that do not have slow network
-  # dependencies) or applications that use DevFdResponse for deferrable
-  # response bodies.  It does not require your Rack application to be
-  # thread-safe, reentrancy is only required for the DevFdResponse body
-  # generator.
-  #
-  # Compatibility: Whatever \Rev itself supports, currently Ruby
-  # 1.8/1.9.
-  #
-  # This model does not implement as streaming "rack.input" which
-  # allows the Rack application to process data as it arrives.  This
-  # means "rack.input" will be fully buffered in memory or to a
-  # temporary file before the application is entered.
+module Rainbows::Rev
 
-  module Rev
+  # :stopdoc:
+  # keep-alive timeout scoreboard
+  KATO = {}
 
-    # :stopdoc:
-    # keep-alive timeout scoreboard
-    KATO = {}
+  # all connected clients
+  CONN = {}
 
-    # all connected clients
-    CONN = {}
-
-    if {}.respond_to?(:compare_by_identity)
-      CONN.compare_by_identity
-      KATO.compare_by_identity
-    end
-
-    autoload :DeferredResponse,'rainbows/rev/deferred_response'
-    autoload :DeferredChunkResponse,'rainbows/rev/deferred_chunk_response'
-    include Core
-    # :startdoc:
+  if {}.respond_to?(:compare_by_identity)
+    CONN.compare_by_identity
+    KATO.compare_by_identity
   end
+
+  include Rainbows::Rev::Core
+  # :startdoc:
 end
+require 'rainbows/rev/deferred_response'
+require 'rainbows/rev/deferred_chunk_response'