From 154e7af0225a0375274991ee7bd1fc8ad22c1c37 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Dec 2009 23:39:32 -0800 Subject: add RevThreadPool concurrency model This should be like RevThreadSpawn except with more predictable performance (but higher memory usage under low load). --- t/GNUmakefile | 1 + t/simple-http_RevThreadPool.ru | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 t/simple-http_RevThreadPool.ru (limited to 't') diff --git a/t/GNUmakefile b/t/GNUmakefile index 32893ce..ec04607 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -32,6 +32,7 @@ ifeq ($(ONENINE),true) # technically this works under 1.8, but wait until rev 0.3.2 models += RevThreadSpawn + models += RevThreadPool endif all_models := $(models) Base diff --git a/t/simple-http_RevThreadPool.ru b/t/simple-http_RevThreadPool.ru new file mode 100644 index 0000000..43dde1a --- /dev/null +++ b/t/simple-http_RevThreadPool.ru @@ -0,0 +1,9 @@ +use Rack::ContentLength +use Rack::ContentType +run lambda { |env| + if env['rack.multithread'] && env['rainbows.model'] == :RevThreadPool + [ 200, {}, [ env.inspect << "\n" ] ] + else + raise "rack.multithread is false" + end +} -- cgit v1.2.3-24-ge0c7