diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-25 10:18:02 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-25 11:58:46 -0800 |
commit | 7da8f7696fafc22a50dbcded6ca44cad7ae32ab6 (patch) | |
tree | 981fe68952ed4d96196d5057abf8402b562690d4 /t/simple-http_FiberPool.ru | |
parent | 69b3f0f1627744926f53d13714ba62f0e83333c8 (diff) | |
download | rainbows-7da8f7696fafc22a50dbcded6ca44cad7ae32ab6.tar.gz |
This is another Fiber-based concurrency model that can exploit a streaming "rack.input" for clients. Spawning Fibers seems pretty fast, but maybe there are apps that will benefit from this.
Diffstat (limited to 't/simple-http_FiberPool.ru')
-rw-r--r-- | t/simple-http_FiberPool.ru | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/simple-http_FiberPool.ru b/t/simple-http_FiberPool.ru new file mode 100644 index 0000000..ae5b649 --- /dev/null +++ b/t/simple-http_FiberPool.ru @@ -0,0 +1,9 @@ +use Rack::ContentLength +use Rack::ContentType +run lambda { |env| + if env['rack.multithread'] == false && env['rainbows.model'] == :FiberPool + [ 200, {}, [ Thread.current.inspect << "\n" ] ] + else + raise "rack.multithread is not true" + end +} |