queue

package
v3.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue added in v3.0.3

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

Queue defines a lock-free Queue.

func NewQueue added in v3.0.3

func NewQueue() *Queue

NewQueue creates and returns a new lock-free queue.

func (*Queue) Dequeue added in v3.0.3

func (q *Queue) Dequeue() interface{}

Dequeue removes and returns the value at the head of the queue. It returns nil if the queue is empty.

func (*Queue) Enqueue added in v3.0.3

func (q *Queue) Enqueue(v interface{})

Enqueue adds a value to the tail of the queue.

func (*Queue) IsEmpty added in v3.0.3

func (q *Queue) IsEmpty() bool

IsEmpty returns true when the queue is empty

func (*Queue) Length added in v3.0.3

func (q *Queue) Length() uint64

Length returns the number of items in the queue.

Jump to

Keyboard shortcuts

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