Sha256: 0d58b3962969e8d791e08779a7e2d4e77ef17984498b4763efba6207fec06258

Contents?: true

Size: 822 Bytes

Versions: 12

Compression:

Stored size: 822 Bytes

Contents

# -*- encoding: binary -*-
require 'raindrops'
require 'rainbows/epoll'

# 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.
#
# === RubyGem Requirements
#
# * raindrops 0.6.0 or later
# * sleepy_penguin 3.0.1 or later
# * sendfile 1.1.0 or later
module Rainbows::XEpoll
  # :stopdoc:
  include Rainbows::Base
  autoload :Client, 'rainbows/xepoll/client'

  def init_worker_process(worker)
    super
    Rainbows.const_set(:EP, SleepyPenguin::Epoll.new)
    Rainbows::Client.__send__ :include, Client
  end

  def worker_loop(worker) # :nodoc:
    init_worker_process(worker)
    Client.loop
  end
  # :startdoc:
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rainbows-4.5.0 lib/rainbows/xepoll.rb
rainbows-4.4.3 lib/rainbows/xepoll.rb
rainbows-4.4.2 lib/rainbows/xepoll.rb
rainbows-4.4.1.1.gd5c8c lib/rainbows/xepoll.rb
rainbows-4.4.1 lib/rainbows/xepoll.rb
rainbows-4.4.0 lib/rainbows/xepoll.rb
rainbows-4.3.1 lib/rainbows/xepoll.rb
rainbows-4.3.0 lib/rainbows/xepoll.rb
rainbows-4.2.0 lib/rainbows/xepoll.rb
rainbows-4.1.0 lib/rainbows/xepoll.rb
rainbows-4.0.0 lib/rainbows/xepoll.rb
rainbows-3.4.0 lib/rainbows/xepoll.rb