Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedQueue ¶
type BufferedQueue[T any] struct { // contains filtered or unexported fields }
BufferedQueue implements a buffered queue using a linked list of job chunks
func NewBufferedQueue ¶
func NewBufferedQueue[T any](chunkSize int) *BufferedQueue[T]
NewBufferedQueue creates a new buffered queue with the specified chunk size
func (*BufferedQueue[T]) CloseInput ¶
func (q *BufferedQueue[T]) CloseInput()
func (*BufferedQueue[T]) Dequeue ¶
func (q *BufferedQueue[T]) Dequeue() (T, bool)
Dequeue removes and returns a job from the queue
func (*BufferedQueue[T]) Enqueue ¶
func (q *BufferedQueue[T]) Enqueue(job T) error
Enqueue adds a job to the queue
func (*BufferedQueue[T]) IsEmpty ¶
func (q *BufferedQueue[T]) IsEmpty() bool
IsEmpty returns true if the queue is empty
func (*BufferedQueue[T]) PeekHead ¶
func (q *BufferedQueue[T]) PeekHead() (T, bool)
func (*BufferedQueue[T]) Size ¶
func (q *BufferedQueue[T]) Size() int
Size returns the number of items in the queue
type ItemChunkNode ¶
type ItemChunkNode[T any] struct { // contains filtered or unexported fields }
ItemChunkNode represents a node in the linked list of job chunks
Click to show internal directories.
Click to hide internal directories.