diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-02-05 10:11:56 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-02-05 10:11:56 +0000 |
commit | c9ca82c76f1eb0e06b0aa204a243d00f382579c5 (patch) | |
tree | 4ca29dd42f3114c89b31022b993c38247fd0fe98 /lib/rainbows/epoll.rb | |
parent | d8e3edadd128a2ee5712b87a6b660295de2df6be (diff) | |
download | rainbows-c9ca82c76f1eb0e06b0aa204a243d00f382579c5.tar.gz |
There's a lot of code duplication here :<
Diffstat (limited to 'lib/rainbows/epoll.rb')
-rw-r--r-- | lib/rainbows/epoll.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rainbows/epoll.rb b/lib/rainbows/epoll.rb index c8c013e..b567142 100644 --- a/lib/rainbows/epoll.rb +++ b/lib/rainbows/epoll.rb @@ -7,11 +7,18 @@ require 'sendfile' # and optimized for throughput at the expense of fairness module Rainbows::Epoll include Rainbows::Base + ReRun = [] autoload :Server, 'rainbows/epoll/server' autoload :Client, 'rainbows/epoll/client' autoload :ResponsePipe, 'rainbows/epoll/response_pipe' autoload :ResponseChunkPipe, 'rainbows/epoll/response_chunk_pipe' + def self.rerun + while obj = ReRun.shift + obj.epoll_run + end + end + def init_worker_process(worker) super Rainbows::Epoll.const_set :EP, SleepyPenguin::Epoll.new |