Sha256: b45a5c37b0c57f07ed8ecfe6d6554ced49212d0f836ee042cd69e5940176a2c4

Contents?: true

Size: 720 Bytes

Versions: 26

Compression:

Stored size: 720 Bytes

Contents

# -*- encoding: binary -*-
# :enddoc:
module Rainbows::Coolio::Core
  include Rainbows::Base

  # runs inside each forked worker, this sits around and waits
  # for connections and doesn't die until the parent dies (or is
  # given a INT, QUIT, or TERM signal)
  def worker_loop(worker)
    init_worker_process(worker)
    mod = Rainbows.const_get(@use)
    rloop = Rainbows::Coolio::Server.const_set(:LOOP, Coolio::Loop.default)
    Rainbows::Coolio::Server.const_set(:MAX, @worker_connections)
    Rainbows::Coolio::Server.const_set(:CL, mod.const_get(:Client))
    Rainbows::Coolio::Heartbeat.new(1, true).attach(rloop)
    LISTENERS.map! { |s| Rainbows::Coolio::Server.new(s).attach(rloop) }
    rloop.run
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rainbows-4.1.0 lib/rainbows/coolio/core.rb
rainbows-4.0.0 lib/rainbows/coolio/core.rb
rainbows-3.4.0 lib/rainbows/coolio/core.rb
rainbows-3.3.0 lib/rainbows/coolio/core.rb
rainbows-3.2.0 lib/rainbows/coolio/core.rb
rainbows-3.1.0 lib/rainbows/coolio/core.rb