def writeBlock(pieceIndex, offset, block)
      id = returnAndIncrRequestId
      return id if @state == :after_stop
      @requests.push [id, :write_block, pieceIndex, offset, block]
      @requestsSemaphore.signal
      id
    end
def writeBlock(pieceIndex, offset, block)
      id = returnAndIncrRequestId
      return id if @state == :after_stop
      @requests.push [id, :write_block, pieceIndex, offset, block]
      @requestsSemaphore.signal
      id
    end
Write a block to the torrent asynchronously.