lib/polyphony/core/sync.rb
# Locks the mutex, runs the block, then unlocks it.
#
# This method is re-entrant. Recursive calls from the given block will not
# block.
#
# @param &block [Proc] code to run
# @return [any] return value of block
Locks the mutex, runs the block, then unlocks it.
This method is re-entrant. Recursive calls from the given block will not
block.
Locks the mutex runs the block then unlocks it . This method is re - entrant . Recursive calls from the given block will not block .
def synchronize(&block)
      return yield if @holding_fiber == Fiber.current
      synchronize_not_holding(&block)
    end
def synchronize ( & block ) return yield if @holding_fiber == Fiber . current synchronize_not_holding ( & block ) end
Locks the mutex, runs the block, then unlocks it.
Locks the mutex runs the block then unlocks it .
return value of block
return value of block
any
block
<not_specific>
&block
<not_specific>
code to run
code to run