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 # Do not use this if you have slow external dependencies.
12 # === RubyGem Requirements
14 # * raindrops 0.6.0 or later
15 # * sleepy_penguin 3.0.1 or later
16 # * sendfile 1.1.0 or later
17 module Rainbows::XEpoll
19 include Rainbows::Base
20 autoload :Client, 'rainbows/xepoll/client'
22 def init_worker_process(worker)
24 Rainbows.const_set(:EP, SleepyPenguin::Epoll.new)
25 Rainbows::Client.__send__ :include, Client
28 def worker_loop(worker) # :nodoc:
29 init_worker_process(worker)