about summary refs log tree commit homepage
path: root/lib/rainbows/fiber/base.rb
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 /lib/rainbows/fiber/base.rb
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 'lib/rainbows/fiber/base.rb')
-rw-r--r--lib/rainbows/fiber/base.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb
index 1617c54..090a9e4 100644
--- a/lib/rainbows/fiber/base.rb
+++ b/lib/rainbows/fiber/base.rb
@@ -16,7 +16,8 @@ module Rainbows
     # puts the current Fiber into uninterruptible sleep for at least
     # +seconds+.  Unlike Kernel#sleep, this it is not possible to sleep
     # indefinitely to be woken up (nobody wants that in a web server,
-    # right?).
+    # right?).  Calling this directly is deprecated, use
+    # Rainbows.sleep(seconds) instead.
     def self.sleep(seconds)
       ZZ[::Fiber.current] = Time.now + seconds
       ::Fiber.yield