unbounded

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue is a concurrency safety non-blocking queue, used in scenarios with multiple Producers and single Consumers.

func New

func New[T any]() *Queue[T]

func (*Queue[T]) Peek

func (q *Queue[T]) Peek() (T, bool)

func (*Queue[T]) Push

func (q *Queue[T]) Push(v T) bool

func (*Queue[T]) SharedPop

func (q *Queue[T]) SharedPop() (T, bool)

func (*Queue[T]) UniquePop

func (q *Queue[T]) UniquePop() (T, bool, bool)

Jump to

Keyboard shortcuts

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