xepoll_thread_pool: add optional :pool_size argument
[rainbows.git] / lib / rainbows / xepoll_thread_pool.rb
blobb6eb55d34d43f02c9b6c31b42cfa2fba16137bfb
1 # -*- encoding: binary -*-
2 require "thread"
3 require "sleepy_penguin"
4 require "raindrops"
6 module Rainbows::XEpollThreadPool
7   include Rainbows::Base
8   extend Rainbows::PoolSize
10   def init_worker_process(worker)
11     super
12     require "rainbows/xepoll_thread_pool/client"
13     Rainbows::Client.__send__ :include, Client
14   end
16   def worker_loop(worker) # :nodoc:
17     init_worker_process(worker)
18     Client.loop
19   end
20 end