diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-01 13:38:50 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-01 13:38:50 -0800 |
commit | f2dc198ae1d145743860ab7d4f523d54eafd4ca1 (patch) | |
tree | b50cf0fee352f100646f3d2993a06c9d88197fd7 | |
parent | 0af9343c98b7b8d9596b526b87fd5e67bb8c4a68 (diff) | |
download | rainbows-f2dc198ae1d145743860ab7d4f523d54eafd4ca1.tar.gz |
The problem is unconfirmed at the moment, but I've long anticipated it. I just need to remember the next time I log into a monster machine.
-rw-r--r-- | lib/rainbows/thread_pool.rb | 5 |
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 |