queue

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

func NewListInternalPoolQueue[E any](sizeHint int) container.Queue[E]

NewListInternalPoolQueue preheats the element pool.

func NewListQueue

func NewListQueue[E any](_ int) container.Queue[E]

func NewListSyncPoolQueue

func NewListSyncPoolQueue[E any](sizeHint int) container.Queue[E]

NewListSyncPoolQueue preheats the element pool.

func NewSliceQueue

func NewSliceQueue[E any](sizeHint int) container.Queue[E]

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL