Sha256: 0cf5c4b17b481669714e1b386648374b8f2ed48ab9e685a59e36ac6a4a23c8e8

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

# -*- encoding: binary -*-
# :enddoc:
module Rainbows::NeverBlock::Core
  def init_worker_process(worker)
    super
    o = Rainbows::O
    pool = NB::Pool::FiberPool.new(o[:pool_size])
    base = o[:backend].to_s.gsub!(/([a-z])([A-Z])/, '\1_\2').downcase!
    require "rainbows/never_block/#{base}"
    client_class = Rainbows::NeverBlock::Client
    client_class.superclass.const_set(:APP, Rainbows::G.server.app)
    client_class.const_set(:POOL, pool)
    logger.info "NeverBlock/#{o[:backend]} pool_size=#{o[:pool_size]}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rainbows-2.1.0 lib/rainbows/never_block/core.rb