1 # -*- encoding: binary -*-
3 require 'rainbows/epoll'
5 # Edge-triggered epoll concurrency model with blocking accept() in a
6 # (hopefully) native thread. This is just like Epoll, but recommended
7 # for Ruby 1.9 users as it can avoid accept()-scalability issues on
8 # multicore machines with many worker processes.
9 module Rainbows::XEpoll
11 include Rainbows::Base
12 autoload :Client, 'rainbows/xepoll/client'
14 def init_worker_process(worker)
16 Rainbows::Epoll.const_set :EP, SleepyPenguin::Epoll.new
17 Rainbows::Client.__send__ :include, Client
20 def worker_loop(worker) # :nodoc:
21 init_worker_process(worker)