diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-05 02:44:18 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-05 02:47:01 -0700 |
commit | 0be3542b4e16972e0ec5ff354625f45ea8241883 (patch) | |
tree | c84ee04f6f653d9c698fd06cdbf5b9f549595e03 /lib/rainbows/thread_pool.rb | |
parent | b5a0a2cce2c10ade80c1bc9a54d73194bb520776 (diff) | |
download | rainbows-0be3542b4e16972e0ec5ff354625f45ea8241883.tar.gz |
Diffstat (limited to 'lib/rainbows/thread_pool.rb')
-rw-r--r-- | lib/rainbows/thread_pool.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rainbows/thread_pool.rb b/lib/rainbows/thread_pool.rb index 62a04a3..a6269cd 100644 --- a/lib/rainbows/thread_pool.rb +++ b/lib/rainbows/thread_pool.rb @@ -2,6 +2,18 @@ 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. + # + # Applications using this model are required to be thread-safe. + # Threads are never spawned dynamically under this model. If you're + # connecting to external services and need to perform DNS lookups, + # 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. module ThreadPool include Base |