Documentation
¶
Index ¶
- Variables
- func NewListInternalPoolQueue[E any](sizeHint int) container.Queue[E]
- func NewListQueue[E any](_ int) container.Queue[E]
- func NewListSyncPoolQueue[E any](sizeHint int) container.Queue[E]
- func NewSliceQueue[E any](sizeHint int) container.Queue[E]
- func NewWaitableQueue[E any](initialCapacity int, lowWatermark, highWatermark int) (container.WaitableQueue[E], error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCapacityIsNegative = errors.New("container: initial capacity cannot be negative") ErrLowWatermarkIsNegative = errors.New("container: low watermark cannot be negative") ErrHighWatermarkIsNegative = errors.New("container: high watermark cannot be negative") ErrHighWatermarkIsLessThanLowWatermark = errors.New("container: high watermark cannot be less than low watermark") )
Functions ¶
func NewListInternalPoolQueue ¶
NewListInternalPoolQueue preheats the element pool.
func NewListSyncPoolQueue ¶
NewListSyncPoolQueue preheats the element pool.
func NewWaitableQueue ¶ added in v0.2.0
func NewWaitableQueue[E any](initialCapacity int, lowWatermark, highWatermark int) (container.WaitableQueue[E], error)
NewWaitableQueue creates a new WaitableQueue with the given initial capacity and watermarks.
The three arguments are in number of elements, not in bytes. Implementations MAY use the initial capacity to preallocate storage.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.