about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rainbows/coolio_thread_pool.rb15
-rw-r--r--lib/rainbows/never_block.rb3
-rw-r--r--lib/rainbows/xepoll_thread_pool.rb17
3 files changed, 34 insertions, 1 deletions
diff --git a/lib/rainbows/coolio_thread_pool.rb b/lib/rainbows/coolio_thread_pool.rb
index 378e64d..0e616a6 100644
--- a/lib/rainbows/coolio_thread_pool.rb
+++ b/lib/rainbows/coolio_thread_pool.rb
@@ -14,6 +14,21 @@
 #
 # This concurrency model is designed for Ruby 1.9, and Ruby 1.8
 # users are NOT advised to use this due to high CPU usage.
+#
+# === :pool_size vs worker_connections
+#
+# In your Rainbows! config block, you may specify a Thread pool size
+# to limit your application concurrency independently of
+# worker_connections.
+#
+#   Rainbows! do
+#     use :CoolioThreadPool, :pool_size => 50
+#     worker_connections 100
+#   end
+#
+# In extremely rare cases, this may be combined with Rainbows::AppPool
+# if you have different concurrency capabilities for different parts of
+# your Rack application.
 module Rainbows::CoolioThreadPool
   # :stopdoc:
   autoload :Client, 'rainbows/coolio_thread_pool/client'
diff --git a/lib/rainbows/never_block.rb b/lib/rainbows/never_block.rb
index 63d9af3..51ca904 100644
--- a/lib/rainbows/never_block.rb
+++ b/lib/rainbows/never_block.rb
@@ -6,8 +6,11 @@
 # a streaming "rack.input" but is compatible with everything else
 # EventMachine supports.
 #
+# === :pool_size vs worker_connections
+#
 # In your Rainbows! config block, you may specify a Fiber pool size
 # to limit your application concurrency (without using Rainbows::AppPool)
+# independently of worker_connections.
 #
 #   Rainbows! do
 #     use :NeverBlock, :pool_size => 50
diff --git a/lib/rainbows/xepoll_thread_pool.rb b/lib/rainbows/xepoll_thread_pool.rb
index 9107b5d..c1605b8 100644
--- a/lib/rainbows/xepoll_thread_pool.rb
+++ b/lib/rainbows/xepoll_thread_pool.rb
@@ -39,9 +39,24 @@ require "raindrops"
 # exactly the same for an equivalent number of active connections
 # (but independently tunable).
 #
-# Since +:pool_size+ and +worker_connections+ is independently tunable,
+# === :pool_size vs worker_connections
+#
+# Since +:pool_size+ and +worker_connections+ are independently tunable,
 # it is possible to get into situations where active connections need
 # to wait for an idle thread in the thread pool before being processed
+#
+# In your Rainbows! config block, you may specify a Thread pool size
+# to limit your application concurrency independently of
+# worker_connections.
+#
+#   Rainbows! do
+#     use :XEpollThreadPool, :pool_size => 50
+#     worker_connections 100
+#   end
+#
+# In extremely rare cases, this may be combined with Rainbows::AppPool
+# if you have different concurrency capabilities for different parts of
+# your Rack application.
 
 module Rainbows::XEpollThreadPool
   extend Rainbows::PoolSize