lib/polyphony/extensions/fiber.rb
# Creates a new child fiber.
#
#   child = fiber.spin { sleep 10; fiber.stop }
#
# @param tag [any] child fiber's tag
# @param orig_caller [Array<String>] caller to set for fiber
# @param &block [Proc] child fiber's block
# @return [Fiber] child fiber
Creates a new child fiber.
Creates a new child fiber .
def spin(tag = nil, orig_caller = Kernel.caller, &block)
      f = Fiber.new { |v| f.run(v) }
      f.prepare(tag, block, orig_caller, self)
      (@children ||= {})[f] = true
      f.monitor(self) if @supervise_mode
      f
    end
def spin ( tag = nil , orig_caller = Kernel . caller , & block ) f = Fiber . new { | v | f . run ( v ) } f . prepare ( tag , block , orig_caller , self ) ( @children ||= { } ) [ f ] = true f . monitor ( self ) if @supervise_mode f end
Creates a new child fiber.
Creates a new child fiber .
None
Fiber
tag
child fiber's tag
child fiber ' s tag
orig_caller
caller to set for fiber
caller to set for fiber
caller
<not_specific>
block
<not_specific>
&block
<not_specific>
child fiber's block
child fiber ' s block