From 0836409458e674d701f2be6c26aa85d441959562 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 14 Oct 2009 18:26:42 -0700 Subject: rack: expose "rainbows.model" in Rack environment This allows applications to determine which concurrency model they're running under and possibly make adjustments accordingly. The standard "rack.multithread" isn't enough for some applications to determine what to do, especially when reentrancy is required/recommended. --- lib/rainbows/http_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb index 0d9ef35..fc51ac3 100644 --- a/lib/rainbows/http_server.rb +++ b/lib/rainbows/http_server.rb @@ -31,7 +31,7 @@ module Rainbows Module === mod or raise ArgumentError, "concurrency model #{model.inspect} not supported" extend(mod) - @use = model + Const::RACK_DEFAULTS['rainbows.model'] = @use = model end def worker_connections(*args) -- cgit v1.2.3-24-ge0c7