1 # -*- encoding: binary -*-
4 require 'rainbows/epoll'
6 # Edge-triggered epoll concurrency model with blocking accept() in
7 # a (hopefully) native thread. This is recommended over Epoll for
8 # Ruby 1.9 users as it can workaround accept()-scalability issues
9 # on multicore machines.
10 module Rainbows::XAcceptEpoll
11 include Rainbows::Base
12 autoload :Client, 'rainbows/xaccept_epoll/client'
14 def init_worker_process(worker)
16 Rainbows::Epoll.const_set :EP, SleepyPenguin::Epoll.new
17 trap(:QUIT) { Rainbows::Epoll.quit! }
18 Rainbows::Client.__send__ :include, Client
21 def worker_loop(worker) # :nodoc:
22 init_worker_process(worker)