summary refs log tree commit homepage
path: root/lib/rainbows/xepoll_thread_pool.rb
blob: b6eb55d34d43f02c9b6c31b42cfa2fba16137bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- encoding: binary -*-
require "thread"
require "sleepy_penguin"
require "raindrops"

module Rainbows::XEpollThreadPool
  include Rainbows::Base
  extend Rainbows::PoolSize

  def init_worker_process(worker)
    super
    require "rainbows/xepoll_thread_pool/client"
    Rainbows::Client.__send__ :include, Client
  end

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