func (b *Buffer) Read() (interface{}, SeqNo, error) {
	for {
		chunk, seqno := b.read()
		if chunk != nil {
			if _, isEOF := chunk.(eof); isEOF {
				return nil, seqno, io.EOF
			}
			return chunk, seqno, nil
		}
		// If nothing read, wait for the next read strobe or kill signal.
		// Superflous read signals (when no new reads are available) are OK.
		if _, readReady := <-b.rch; !readReady {
			return nil, 0, io.ErrUnexpectedEOF
		}
	}
}
// Read returns the next item that is due in the read order.
// An io.EOF is returned if the next chunk is EOF, indicating that the stream of Writes has been closed, but the Buffer object is still operational.
// An io.ErrUnexpectedEOF is returned if the Buffer has been Kill'ed.
Read returns the next item that is due in the read order.
An io.EOF is returned if the next chunk is EOF, indicating that the stream of Writes has been closed, but the Buffer object is still operational.
An io.ErrUnexpectedEOF is returned if the Buffer has been Kill'ed.
// Read returns the next item that is due in the read order . // An io . EOF is returned if the next chunk is EOF indicating that the stream of Writes has been closed but the Buffer object is still operational . // An io . ErrUnexpectedEOF is returned if the Buffer has been Kill ' ed .
func (b *Buffer) Read() (interface{}, SeqNo, error) {
	for {
		chunk, seqno := b.read()
		if chunk != nil {
			if _, isEOF := chunk.(eof); isEOF {
				return nil, seqno, io.EOF
			}
			return chunk, seqno, nil
		}
		if _, readReady := <-b.rch; !readReady {
			return nil, 0, io.ErrUnexpectedEOF
		}
	}
}
func ( b * Buffer ) Read ( ) ( interface { } , SeqNo , error ) { for { chunk , seqno := b . read ( ) if chunk != nil { if _ , isEOF := chunk . ( eof ) ; isEOF { return nil , seqno , io . EOF } return chunk , seqno , nil } if _ , readReady := <- b . rch ; ! readReady { return nil , 0 , io . ErrUnexpectedEOF } } }
Read returns the next item that is due in the read order.
Read returns the next item that is due in the read order .
// If nothing read, wait for the next read strobe or kill signal. // Superflous read signals (when no new reads are available) are OK.