From 40445641f11f01c6a24bf96c8b80eed5fd33a512 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 28 Dec 2010 17:59:27 -0800 Subject: complete Rev => Coolio renaming We use Cool.io internally everywhere now, but preserve Rev-based models for anybody using them. --- lib/rainbows/coolio_thread_spawn.rb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'lib/rainbows/coolio_thread_spawn.rb') diff --git a/lib/rainbows/coolio_thread_spawn.rb b/lib/rainbows/coolio_thread_spawn.rb index 81591d9..7ea3bda 100644 --- a/lib/rainbows/coolio_thread_spawn.rb +++ b/lib/rainbows/coolio_thread_spawn.rb @@ -1,8 +1,4 @@ # -*- encoding: binary -*- -# :stopdoc: -Rainbows.const_set(:CoolioThreadSpawn, Rainbows::RevThreadSpawn) -# :startdoc: - # A combination of the Coolio and ThreadSpawn models. This allows Ruby # Thread-based concurrency for application processing. It DOES NOT # expose a streamable "rack.input" for upload processing within the @@ -17,4 +13,15 @@ Rainbows.const_set(:CoolioThreadSpawn, Rainbows::RevThreadSpawn) # # This concurrency model is designed for Ruby 1.9, and Ruby 1.8 # users are NOT advised to use this due to high CPU usage. -module Rainbows::CoolioThreadSpawn; end +module Rainbows::CoolioThreadSpawn + include Rainbows::Coolio::Core + + def init_worker_process(worker) # :nodoc: + super + master = Rainbows::Coolio::Master.new(Queue.new) + master.attach(Coolio::Loop.default) + Client.const_set(:MASTER, master) + end +end +# :enddoc: +require 'rainbows/coolio_thread_spawn/client' -- cgit v1.2.3-24-ge0c7