Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cursor ¶
type Cursor[T Element] struct { // contains filtered or unexported fields }
func (*Cursor[T]) FreeCurrent ¶
func (c *Cursor[T]) FreeCurrent()
FreeCurrent decrease reference for last node and check free.
func (*Cursor[T]) Next ¶
Next reads the next value if no value is available, Next blocks until value is queued if cursor is closed or no more values can be queued, returns zero value and false
type Element ¶
type Element interface {
// SizeInSpool returns the size to occupy in the pool's capacity
SizeInSpool() int64
// SpoolFree will be called if no further cursor can see the value
SpoolFree()
}
type Spool ¶
type Spool[T Element] struct { // contains filtered or unexported fields }
Spool is a single producer multiple consumer queue
func (*Spool[T]) Close ¶
func (s *Spool[T]) Close()
Close closes the spool queued values can still be read
Click to show internal directories.
Click to hide internal directories.