about summary refs log tree commit homepage
path: root/lib/rainbows/thread_pool.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-14 18:25:15 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-14 18:25:15 -0700
commitb14f5bcec7d9864faed7fcb06028eafe89a4a722 (patch)
treee646668dc41704beb1bcaf38c5c9c3800e5247cb /lib/rainbows/thread_pool.rb
parent48dbd227580c592f1ae24054449b6da4490714ec (diff)
downloadrainbows-b14f5bcec7d9864faed7fcb06028eafe89a4a722.tar.gz
Diffstat (limited to 'lib/rainbows/thread_pool.rb')
-rw-r--r--lib/rainbows/thread_pool.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/rainbows/thread_pool.rb b/lib/rainbows/thread_pool.rb
index 50d0322..d7f0b14 100644
--- a/lib/rainbows/thread_pool.rb
+++ b/lib/rainbows/thread_pool.rb
@@ -3,8 +3,14 @@
 module Rainbows
 
   # Implements a worker thread pool model.  This is suited for platforms
-  # where the cost of dynamically spawning a new thread for every new
-  # client connection is too high.
+  # like Ruby 1.9, where the cost of dynamically spawning a new thread
+  # for every new client connection is higher than with the ThreadSpawn
+  # model.
+  #
+  # This model should provide a high level of compatibility with all
+  # Ruby implementations, and most libraries and applications.
+  # Applications running under this model should be thread-safe
+  # but not necessarily reentrant.
   #
   # Applications using this model are required to be thread-safe.
   # Threads are never spawned dynamically under this model.  If you're
@@ -12,8 +18,9 @@ module Rainbows
   # consider using the "resolv-replace" library which replaces parts of
   # the core Socket package with concurrent DNS lookup capabilities.
   #
-  # This model is less suited for many slow clients than the others and
-  # thus a lower +worker_connections+ setting is recommended.
+  # This model probably less suited for many slow clients than the
+  # others and thus a lower +worker_connections+ setting is recommended.
+
   module ThreadPool
 
     include Base