Queues

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 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 ArrayQueue

type ArrayQueue[T any] interface {
	Queue[T]
	Shrink()
	Clear()
	Size() uint
	// contains filtered or unexported methods
}

func MakeArrayQueue

func MakeArrayQueue[T any](initCap uint) ArrayQueue[T]

type BlockingQueue

type BlockingQueue[T any] interface {
	Queue[T]
	WaitAndPop() T
}

type EmptyQueueError

type EmptyQueueError struct {
}

func (*EmptyQueueError) Error

func (e *EmptyQueueError) Error() string

type Queue

type Queue[T any] interface {
	Push(item T)
	Pop() (T, error)
	Peek() T
	Empty() bool
}

func MakeConcurrentLinkedQueue

func MakeConcurrentLinkedQueue[T any]() Queue[T]

type UnexpectedError

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

func (*UnexpectedError) Error

func (e *UnexpectedError) Error() string

Jump to

Keyboard shortcuts

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