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