diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-14 18:49:58 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-14 20:33:37 +0000 |
commit | 18db44fe89b8ba61f21b92f6efece37baa8bd6c7 (patch) | |
tree | aac0be37b373f23d7059739156aff9bb7025e7b9 /t/rack-fiber_pool/app.ru | |
parent | 2eb58a62a5e738c287db8239f4f4e8d1d02ed328 (diff) | |
download | rainbows-18db44fe89b8ba61f21b92f6efece37baa8bd6c7.tar.gz |
We always try to track the latest and greatest. We've also updated the test to actually test concurrency since rack-fiber_pool reuses recent fibers now.
Diffstat (limited to 't/rack-fiber_pool/app.ru')
-rw-r--r-- | t/rack-fiber_pool/app.ru | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/rack-fiber_pool/app.ru b/t/rack-fiber_pool/app.ru index a4777ca..e4f60a4 100644 --- a/t/rack-fiber_pool/app.ru +++ b/t/rack-fiber_pool/app.ru @@ -2,4 +2,9 @@ require 'rack/fiber_pool' use Rack::FiberPool use Rack::ContentLength use Rack::ContentType, 'text/plain' -run lambda { |env| [ 200, {}, [ "#{Fiber.current}\n" ] ] } +run lambda { |env| + f = Fiber.current + EM.add_timer(3) { f.resume } + Fiber.yield + [ 200, {}, [ "#{f}\n" ] ] +} |