about summary refs log tree commit homepage
path: root/lib/rainbows/thread_pool.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/thread_pool.rb')
-rw-r--r--lib/rainbows/thread_pool.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rainbows/thread_pool.rb b/lib/rainbows/thread_pool.rb
index 30e8f69..6556164 100644
--- a/lib/rainbows/thread_pool.rb
+++ b/lib/rainbows/thread_pool.rb
@@ -44,6 +44,11 @@ module Rainbows
       Thread.new {
         begin
           begin
+            # TODO: check if select() or accept() is a problem on large
+            # SMP systems under Ruby 1.9.  Hundreds of native threads
+            # all working off the same socket could be a thundering herd
+            # problem.  On the other hand, a thundering herd may not
+            # even incur as much overhead as an extra Mutex#synchronize
             ret = IO.select(LISTENERS, nil, nil, 1) and
                   ret.first.each do |sock|
                     begin