about summary refs log tree commit homepage
path: root/lib/rainbows/xepoll_thread_pool.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/xepoll_thread_pool.rb')
-rw-r--r--lib/rainbows/xepoll_thread_pool.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/rainbows/xepoll_thread_pool.rb b/lib/rainbows/xepoll_thread_pool.rb
new file mode 100644
index 0000000..5ce89a0
--- /dev/null
+++ b/lib/rainbows/xepoll_thread_pool.rb
@@ -0,0 +1,20 @@
+# -*- encoding: binary -*-
+require "thread"
+require "sleepy_penguin"
+require "raindrops"
+
+module Rainbows::XEpollThreadPool
+  include Rainbows::Base
+
+  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
+