Method: Bio::MAF::ThreadedChunkReaderWrapper#read_ahead

Defined in:
lib/bio/maf/parser.rb

#read_aheadObject

Read ahead into queue.



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/bio/maf/parser.rb', line 117

def read_ahead
  # n = 0
  begin
    until f.eof?
      chunk = cr.read_chunk
      c_pos = cr.pos
      @buffer.put([c_pos, chunk])
    end
    @buffer.put(:eof)
    # @eof_reached = true
  rescue Exception
    @read_ahead_ex = $!
    LOG.error $!
    @buffer.put($!)
  end
end