app/server/sonicpi/lib/sonicpi/node.rb
# block will be called when the node is destroyed or immediately if
# node is already destroyed. Possibly executed on a separate thread.
block will be called when the node is destroyed or immediately if
node is already destroyed. Possibly executed on a separate thread.
block will be called when the node is destroyed or immediately if node is already destroyed . Possibly executed on a separate thread .
def on_destroyed(&block)
      @state_change_sem.synchronize do
        if @state == :destroyed
          block.call
        else
          @on_destroyed_callbacks << block
        end
      end
    end
def on_destroyed ( & block ) @state_change_sem . synchronize do if @state == :destroyed block . call else @on_destroyed_callbacks << block end end end
block will be called when the node is destroyed or immediately if
node is already destroyed.
block will be called when the node is destroyed or immediately if node is already destroyed .
block
<not_specific>