queue

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT 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 thread-safe FIFO data structure.

func NewQueue

func NewQueue() *Queue

NewQueue returns a new Queue.

func (*Queue) Len

func (q *Queue) Len() int

Len returns the number of elements in the queue.

func (*Queue) Pop

func (q *Queue) Pop() any

Pop removes and returns the element at the front of the queue.

func (*Queue) Push

func (q *Queue) Push(a any)

Push adds an element to the end of the queue.

Jump to

Keyboard shortcuts

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