From b14f5bcec7d9864faed7fcb06028eafe89a4a722 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 14 Oct 2009 18:25:15 -0700 Subject: documentation updates (mostly on network models) --- lib/rainbows/thread_pool.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/rainbows/thread_pool.rb') 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 -- cgit v1.2.3-24-ge0c7