From d3b97d1114e2d23a9231fe889cd5bf6927d451ba Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Jul 2010 08:04:48 +0000 Subject: doc: avoid documenting internals on RDoc website Since we suck at building websites, we just rely on RDoc as a website builder. And since Rainbows! is an application server (and not a programming library), our internal API should be of little interest to end users. Anybody interested in Rainbows! (or any other project) internals should be reading the source. --- lib/rainbows/rev_thread_pool.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/rainbows/rev_thread_pool.rb') diff --git a/lib/rainbows/rev_thread_pool.rb b/lib/rainbows/rev_thread_pool.rb index 918b57a..5a7ff82 100644 --- a/lib/rainbows/rev_thread_pool.rb +++ b/lib/rainbows/rev_thread_pool.rb @@ -20,17 +20,19 @@ module Rainbows module RevThreadPool + # :stopdoc: DEFAULTS = { :pool_size => 20, # same default size as ThreadPool (w/o Rev) } + #:startdoc: - def self.setup + def self.setup # :nodoc: 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 - class PoolWatcher < ::Rev::TimerWatcher + class PoolWatcher < ::Rev::TimerWatcher # :nodoc: all def initialize(threads) @threads = threads super(G.server.timeout, true) @@ -41,7 +43,7 @@ module Rainbows end end - class Client < Rainbows::Rev::ThreadClient + class Client < Rainbows::Rev::ThreadClient # :nodoc: def app_dispatch QUEUE << self end @@ -49,7 +51,7 @@ module Rainbows include Rainbows::Rev::Core - def init_worker_threads(master, queue) + def init_worker_threads(master, queue) # :nodoc: O[:pool_size].times.map do Thread.new do begin @@ -62,7 +64,7 @@ module Rainbows end end - def init_worker_process(worker) + def init_worker_process(worker) # :nodoc: super master = Rev::Master.new(Queue.new).attach(::Rev::Loop.default) queue = Client.const_set(:QUEUE, Queue.new) -- cgit v1.2.3-24-ge0c7