lib/rainbows/fiber.rb in rainbows-3.4.0 vs lib/rainbows/fiber.rb in rainbows-4.0.0
- old
+ new
@@ -1,31 +1,28 @@
# -*- encoding: binary -*-
-# :stopdoc:
+# :enddoc:
begin
require 'fiber'
rescue LoadError
defined?(NeverBlock) or raise
end
-# :startdoc:
# core namespace for all things that use Fibers in \Rainbows!
#
# It's generally not recommended to use any of this in your applications
# unless you're willing to accept breakage. Most of this is very
# difficult-to-use, fragile and we don't have much time to devote to
# supporting these in the future.
module Rainbows::Fiber
- # :stopdoc:
# blocked readers (key: fileno, value: Rainbows::Fiber::IO object)
RD = []
# blocked writers (key: fileno, value: Rainbows::Fiber::IO object)
WR = []
# sleeping fibers go here (key: Fiber object, value: wakeup time)
ZZ = {}
- # :startdoc:
# 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?). Calling this directly is deprecated, use