about summary refs log tree commit homepage
path: root/t/simple-http_XEpollThreadPool.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-05-09 00:02:51 +0000
committerEric Wong <normalperson@yhbt.net>2011-05-09 00:02:51 +0000
commit380ef63bc2c8f7b6f1cab7387aa9343bc5720c9c (patch)
tree4d82b6448c63c36bdfb18336d8d437fb3fcd04d6 /t/simple-http_XEpollThreadPool.ru
parentdf00f2b1028ba95450246c82e468878b6ec903a3 (diff)
downloadrainbows-380ef63bc2c8f7b6f1cab7387aa9343bc5720c9c.tar.gz
This is probably friendlier on server resources in the worst
case than XEpollThreadSpawn but may perform worse in the client
client-visible way, too.
Diffstat (limited to 't/simple-http_XEpollThreadPool.ru')
-rw-r--r--t/simple-http_XEpollThreadPool.ru10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/simple-http_XEpollThreadPool.ru b/t/simple-http_XEpollThreadPool.ru
new file mode 100644
index 0000000..36eb127
--- /dev/null
+++ b/t/simple-http_XEpollThreadPool.ru
@@ -0,0 +1,10 @@
+use Rack::ContentLength
+use Rack::ContentType
+run lambda { |env|
+  if env['rack.multithread'] == true &&
+    env['rainbows.model'] == :XEpollThreadPool
+    [ 200, {}, [ Thread.current.inspect << "\n" ] ]
+  else
+    raise env.inspect
+  end
+}