queue

package
v0.49.0-rc.18 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFunc

func DeleteFunc[T any](q *BlockingQueue[T], f func(t T) bool)

Types

type BlockingQueue

type BlockingQueue[T any] struct {
	// contains filtered or unexported fields
}

func NewBlockingQueue

func NewBlockingQueue[T any](capacity int) *BlockingQueue[T]

func (*BlockingQueue[T]) Dequeue

func (q *BlockingQueue[T]) Dequeue(ctx context.Context) (item T, ok bool)

func (*BlockingQueue[T]) Enqueue

func (q *BlockingQueue[T]) Enqueue(ctx context.Context, item T) bool

func (*BlockingQueue[T]) TryDequeue

func (q *BlockingQueue[T]) TryDequeue() (T, bool)

func (*BlockingQueue[T]) TryEnqueue

func (q *BlockingQueue[T]) TryEnqueue(item T) bool

Jump to

Keyboard shortcuts

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