From 067b54ff7950084fc729df04a748e02361d46dc1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Dec 2009 00:50:34 -0800 Subject: EventMachineDefer: preliminary (and) broken version There's a good chunk of tests that fail with this, still. Worse, I haven't been able to figure out what's wrong since it looks like it would involve looking at C++ code... --- lib/rainbows/http_server.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/rainbows/http_server.rb') diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb index 8b9f220..c4f804a 100644 --- a/lib/rainbows/http_server.rb +++ b/lib/rainbows/http_server.rb @@ -61,7 +61,12 @@ module Rainbows end mod.setup if mod.respond_to?(:setup) Const::RACK_DEFAULTS['rainbows.model'] = @use = model.to_sym - Const::RACK_DEFAULTS['rack.multithread'] = !!(/Thread/ =~ model.to_s) + + Const::RACK_DEFAULTS['rack.multithread'] = case model.to_s + when /Thread/, "EventMachineDefer"; true + else false + end + case @use when :Rev, :EventMachine, :NeverBlock Const::RACK_DEFAULTS['rainbows.autochunk'] = true -- cgit v1.2.3-24-ge0c7