queue

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyQueue

type AnyQueue struct {
	// contains filtered or unexported fields
}

AnyQueue is a queue stores any

func NewAnyQueue

func NewAnyQueue(eq func(a any, b any) bool, aa ...any) *AnyQueue

NewAnyQueue builds a AnyQueue

func (*AnyQueue) Get

func (q *AnyQueue) Get(val any) any

Get returns previous stored value that equals to val and remove it from the queue, if not found, return nil

func (*AnyQueue) Put

func (q *AnyQueue) Put(val any)

Put inserts `val` into `q`.

Jump to

Keyboard shortcuts

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