diff options
Diffstat (limited to 'lib/rainbows/thread_pool.rb')
-rw-r--r-- | lib/rainbows/thread_pool.rb | 15 |
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 |