diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-28 17:59:27 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-28 18:00:04 -0800 |
commit | 40445641f11f01c6a24bf96c8b80eed5fd33a512 (patch) | |
tree | 57a7652cc03f46407d51babfd04d72d1c401ac99 /lib/rainbows/coolio_thread_spawn.rb | |
parent | 3495d59763e6159975debf32728dc53fc41c5ea1 (diff) | |
download | rainbows-40445641f11f01c6a24bf96c8b80eed5fd33a512.tar.gz |
complete Rev => Coolio renaming
We use Cool.io internally everywhere now, but preserve Rev-based models for anybody using them.
Diffstat (limited to 'lib/rainbows/coolio_thread_spawn.rb')
-rw-r--r-- | lib/rainbows/coolio_thread_spawn.rb | 17 |
1 files changed, 12 insertions, 5 deletions
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' |