about summary refs log tree commit homepage
path: root/t/t9000.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-22 01:22:32 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-22 13:05:30 -0800
commitfa622de470d475f0afc94cb619cc69e7e127830c (patch)
tree90e7f20bd857bd2db08117029e913627cda2774c /t/t9000.ru
parentcdac4e6b8847754421c6f65baab2ac9a105d746a (diff)
downloadrainbows-fa622de470d475f0afc94cb619cc69e7e127830c.tar.gz
We'll export this across the board to all Rack applications
to sleep with.  This provides the optimum method of sleeping
regardless of the concurrency model you choose.  This method
is still highly not recommended for pure event-driven models
like Rev or EventMachine (but the threaded/fiber/actor-based
variants are fine).
Diffstat (limited to 't/t9000.ru')
-rw-r--r--t/t9000.ru11
1 files changed, 1 insertions, 10 deletions
diff --git a/t/t9000.ru b/t/t9000.ru
index abf36b2..66643b6 100644
--- a/t/t9000.ru
+++ b/t/t9000.ru
@@ -3,16 +3,7 @@ use Rack::ContentType
 use Rainbows::AppPool, :size => ENV['APP_POOL_SIZE'].to_i
 class Sleeper
   def call(env)
-    (case env['rainbows.model']
-    when :FiberPool, :FiberSpawn
-      Rainbows::Fiber
-    when :Revactor
-      Actor
-    when :RevFiberSpawn
-      Rainbows::Fiber::Rev
-    else
-      Kernel
-    end).sleep(1)
+    Rainbows.sleep(1)
     [ 200, {}, [ "#{object_id}\n" ] ]
   end
 end