about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-24 17:00:51 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-24 17:00:51 -0800
commit04b8649b3750a0002094e90a62f7566059c8a4e9 (patch)
tree3f41f268ac8d70b35a26834b04cae62f2183fd6c
parent85ccfbc75abc78f977583db6303e3fb270fd2ec9 (diff)
downloadrainbows-04b8649b3750a0002094e90a62f7566059c8a4e9.tar.gz
We'll be using this more in the future
-rw-r--r--lib/rainbows/epoll.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rainbows/epoll.rb b/lib/rainbows/epoll.rb
index 39c3a27..54d08fb 100644
--- a/lib/rainbows/epoll.rb
+++ b/lib/rainbows/epoll.rb
@@ -12,10 +12,15 @@ module Rainbows::Epoll
   autoload :ResponsePipe, 'rainbows/epoll/response_pipe'
   autoload :ResponseChunkPipe, 'rainbows/epoll/response_chunk_pipe'
 
+  def self.quit!
+    Rainbows.quit!
+    EP.close unless EP.closed?
+  end
+
   def init_worker_process(worker)
     super
     Rainbows::Epoll.const_set :EP, SleepyPenguin::Epoll.new
-    trap(:QUIT) { Rainbows.quit!; EP.close unless EP.closed? }
+    trap(:QUIT) { Rainbows::Epoll.quit! }
     Rainbows::Client.__send__ :include, Client
   end