Module: Rainbows::XEpoll
- Includes:
- Base
- Defined in:
- lib/rainbows/xepoll.rb
Overview
Edge-triggered epoll concurrency model with blocking accept() in a (hopefully) native thread. This is just like Epoll, but recommended for Ruby 1.9 users as it can avoid accept()-scalability issues on multicore machines with many worker processes.
Do not use this if you have slow external dependencies.
RubyGem Requirements
-
raindrops 0.6.0 or later
-
sleepy_penguin 3.0.1 or later
-
sendfile 1.1.0 or later
Instance Method Summary collapse
Methods included from Base
included, #process_client, #reopen_worker_logs, #sig_receiver
Instance Method Details
#init_worker_process(worker) ⇒ Object
22 23 24 25 26 |
# File 'lib/rainbows/xepoll.rb', line 22 def init_worker_process(worker) super Rainbows.const_set(:EP, SleepyPenguin::Epoll.new) Rainbows::Client.__send__ :include, Client end |
#worker_loop(worker) ⇒ Object
:nodoc:
28 29 30 31 |
# File 'lib/rainbows/xepoll.rb', line 28 def worker_loop(worker) # :nodoc: init_worker_process(worker) Client.loop end |