Improved function description

This commit is contained in:
Saxon1 2017-12-04 12:57:35 +10:30
parent 4783f39400
commit 13c6bd531b
1 changed files with 5 additions and 5 deletions

View File

@ -120,11 +120,11 @@ func (rb *ringBuffer) DoneWriting(size int) error {
}
/*
Read gets the address of the next element that we would like to get data
from and thereafter consider empty in the buffer for writing during latter
calls to Get. The address of the data is returned, as well as the size of
the data contained at this address. An error is returned if the buffer is
empty, or there has been a second call to Read before a call to DoneReading.
Read returns a slice containing the next element in the ring buffer and
thereafter considers it empty and can be used for latter writing. The address
of the data is returned, as well as the size of the data contained at this
address. An error is returned if the buffer is empty, or there has been a
second call to Read before a call to DoneReading.
*/
func (rb *ringBuffer) Read() ([]byte, error) {
rb.mutex.Lock()