diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-12-22 01:22:32 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-12-22 13:05:30 -0800 |
commit | fa622de470d475f0afc94cb619cc69e7e127830c (patch) | |
tree | 90e7f20bd857bd2db08117029e913627cda2774c /t/worker-follows-master-to-death.ru | |
parent | cdac4e6b8847754421c6f65baab2ac9a105d746a (diff) | |
download | rainbows-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/worker-follows-master-to-death.ru')
-rw-r--r-- | t/worker-follows-master-to-death.ru | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/t/worker-follows-master-to-death.ru b/t/worker-follows-master-to-death.ru index ed2a519..b372afd 100644 --- a/t/worker-follows-master-to-death.ru +++ b/t/worker-follows-master-to-death.ru @@ -6,12 +6,7 @@ run lambda { |env| case env["PATH_INFO"] when %r{/sleep/(\d+)} - (case env['rainbows.model'] - when :Revactor - Actor - else - Kernel - end).sleep($1.to_i) + Rainbows.sleep($1.to_i) end [ 200, headers, [ "#$$\n" ] ] } |