Sha256: 1e8cb881384405c52c6c92e1f2f55bfb97f5525fe0c9bede24b1a5c0ed708cb5

Contents?: true

Size: 1.13 KB

Versions: 24

Compression:

Stored size: 1.13 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.
#
# === RubyGem Requirements
# * cool.io 1.0.0 or later
module Rainbows::CoolioThreadSpawn
  include Rainbows::Coolio::Core
  autoload :Client, 'rainbows/coolio_thread_spawn/client'

  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:

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rainbows-5.2.1 lib/rainbows/coolio_thread_spawn.rb
rainbows-5.2.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-5.1.1 lib/rainbows/coolio_thread_spawn.rb
rainbows-5.1.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-5.0.0.5.ge717 lib/rainbows/coolio_thread_spawn.rb
rainbows-5.0.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.7.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.6.2 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.6.1 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.6.0.4.g4108 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.6.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.5.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.4.3 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.4.2 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.4.1.1.gd5c8c lib/rainbows/coolio_thread_spawn.rb
rainbows-4.4.1 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.4.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.3.1 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.3.0 lib/rainbows/coolio_thread_spawn.rb
rainbows-4.2.0 lib/rainbows/coolio_thread_spawn.rb