code: func (f *asyncFlusher) waitAll() (int, error) {
  	close(f.chunks)
  	f.wg.Wait()
  	if len(f.errs) == 0 {
  		return f.rowsSent, nil
  	}
  	return f.rowsSent, f.errs
  }
docs: // waitAll waits for completion of all pending 'sendChunk' calls and stops all
  // internal goroutines.
  //
  // Returns total number of rows sent and all the errors.