code: func (bi *blockImporter) readHandler() {
  out:
  	for {
  		// Read the next block from the file and if anything goes wrong
  		// notify the status handler with the error and bail.
  		serializedBlock, err := bi.readBlock()
  		if err != nil {
  			bi.errChan <- fmt.Errorf("Error reading from input "+
  				"file: %v", err.Error())
  			break out
  		}
  
  		// A nil block with no error means we're done.
  		if serializedBlock == nil {
  			break out
  		}
  
  		// Send the block or quit if we've been signalled to exit by
  		// the status handler due to an error elsewhere.
  		select {
  		case bi.processQueue <- serializedBlock:
  		case <-bi.quit:
  			break out
  		}
  	}
  
  	// Close the processing channel to signal no more blocks are coming.
  	close(bi.processQueue)
  	bi.wg.Done()
  }
docs: // readHandler is the main handler for reading blocks from the import file.
  // This allows block processing to take place in parallel with block reads.
  // It must be run as a goroutine.