mirror of https://bitbucket.org/ausocean/av.git
Improved function description
This commit is contained in:
parent
4783f39400
commit
13c6bd531b
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue