about summary refs log tree commit homepage
path: root/t/simple-http_WriterThreadPool.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-05-14 18:12:51 -0700
committerEric Wong <normalperson@yhbt.net>2010-05-14 18:17:09 -0700
commit2260d56329b036bcce7eb69831d3e480334d283c (patch)
tree9db171bc4fa5886afb5135abb896d12a605707b5 /t/simple-http_WriterThreadPool.ru
parent01ee5327c018f64fa4b6aa767c0328c56f699170 (diff)
downloadrainbows-2260d56329b036bcce7eb69831d3e480334d283c.tar.gz
This is based on an idea I originally had for Unicorn but never
implemented in Unicorn since the benefits were unproven and the
risks were too high.
Diffstat (limited to 't/simple-http_WriterThreadPool.ru')
-rw-r--r--t/simple-http_WriterThreadPool.ru9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/simple-http_WriterThreadPool.ru b/t/simple-http_WriterThreadPool.ru
new file mode 100644
index 0000000..0514db4
--- /dev/null
+++ b/t/simple-http_WriterThreadPool.ru
@@ -0,0 +1,9 @@
+use Rack::ContentLength
+use Rack::ContentType
+run lambda { |env|
+  if env['rack.multithread'] && env['rainbows.model'] == :WriterThreadPool
+    [ 200, {}, [ Thread.current.inspect << "\n" ] ]
+  else
+    raise "rack.multithread is false"
+  end
+}