queue

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: GPL-3.0 Imports: 1 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 struct {
	// contains filtered or unexported fields
}

Queue is a simple concurrent safe queue

func New

func New(hint int64) *Queue

New is a constructor for a new concurrent safe queue.

func (*Queue) Copy

func (q *Queue) Copy() []any

Copy get the copy of queue.

func (*Queue) Last

func (q *Queue) Last() any

Last returns the last of item.

func (*Queue) Len

func (q *Queue) Len() int64

Len returns the number of items in this queue.

func (*Queue) Pop

func (q *Queue) Pop() any

Pop returns the head of items.

func (*Queue) Put

func (q *Queue) Put(items ...any)

Put add the item to the queue.

Jump to

Keyboard shortcuts

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