Sha256: aedf9e3b18568594501c7529ecb405d55f903f6243804e4e494d4feeefb09783
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
# -*- encoding: binary -*- # 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 # app. DevFdResponse should be used with this class to proxy # asynchronous responses. All network I/O between the client and # server are handled by the main thread and outside of the core # application dispatch. # # Unlike ThreadSpawn, Cool.io makes this model highly suitable for # slow clients and applications with medium-to-slow response times # (I/O bound), but less suitable for sleepy applications. # # 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 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'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rainbows-2.1.0 | lib/rainbows/coolio_thread_spawn.rb |