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.
10 # === RubyGem Requirements
12 # * raindrops 0.6.0 or later
13 # * sleepy_penguin 3.0.1 or later
14 # * sendfile 1.1.0 or later
15 module Rainbows::XEpoll
17 include Rainbows::Base
18 autoload :Client, 'rainbows/xepoll/client'
20 def init_worker_process(worker)
22 Rainbows.const_set(:EP, SleepyPenguin::Epoll.new)
23 Rainbows::Client.__send__ :include, Client
26 def worker_loop(worker) # :nodoc:
27 init_worker_process(worker)