From 725adcc6986bc2658d92ea3ebebe61d2b83060ad Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 May 2011 00:17:06 +0000 Subject: split out pool_size module coolio_thread_pool, neverblock both use it, and xepoll_thread_pool will support it next, too. --- lib/rainbows/coolio_thread_pool.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/rainbows/coolio_thread_pool.rb') diff --git a/lib/rainbows/coolio_thread_pool.rb b/lib/rainbows/coolio_thread_pool.rb index 3d32bfb..378e64d 100644 --- a/lib/rainbows/coolio_thread_pool.rb +++ b/lib/rainbows/coolio_thread_pool.rb @@ -17,17 +17,8 @@ module Rainbows::CoolioThreadPool # :stopdoc: autoload :Client, 'rainbows/coolio_thread_pool/client' - DEFAULTS = { - :pool_size => 20, # same default size as ThreadPool (w/o Coolio) - } + extend Rainbows::PoolSize #:startdoc: - - def self.setup # :nodoc: - o = Rainbows::O - DEFAULTS.each { |k,v| o[k] ||= v } - Integer === o[:pool_size] && o[:pool_size] > 0 or - raise ArgumentError, "pool_size must a be an Integer > 0" - end include Rainbows::Coolio::Core def init_worker_threads(master, queue) # :nodoc: -- cgit v1.2.3-24-ge0c7