about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-01 23:39:32 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-02 00:23:02 -0800
commit154e7af0225a0375274991ee7bd1fc8ad22c1c37 (patch)
tree2274e7beaa114f88126573830d0bccf7df4c3904 /t
parentc50b69ddf0f1305bb39ed812d084f59db6dd9897 (diff)
downloadrainbows-154e7af0225a0375274991ee7bd1fc8ad22c1c37.tar.gz
This should be like RevThreadSpawn except with more predictable
performance (but higher memory usage under low load).
Diffstat (limited to 't')
-rw-r--r--t/GNUmakefile1
-rw-r--r--t/simple-http_RevThreadPool.ru9
2 files changed, 10 insertions, 0 deletions
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
+}