lib/polyphony/core/global_api.rb
# Runs the given code, then waits for any child fibers of the current fibers
# to terminate.
#
# @param &block [Proc] code to run
# @return [any] given block's return value
Runs the given code, then waits for any child fibers of the current fibers
to terminate.
Runs the given code then waits for any child fibers of the current fibers to terminate .
def spin_scope(&block)
      raise unless block
      spin do
        result = yield
        Fiber.current.await_all_children
        result
      end.await
    end
def spin_scope ( & block ) raise unless block spin do result = yield Fiber . current . await_all_children result end . await end
Runs the given code, then waits for any child fibers of the current fibers
to terminate.
Runs the given code then waits for any child fibers of the current fibers to terminate .
given block's return value
given block ' s return value
any
block
<not_specific>
&block
<not_specific>
code to run
code to run