queue

package
v0.0.0-...-c10fe95 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelQueue

type ChannelQueue[T any] chan T

func (ChannelQueue[T]) Close

func (c ChannelQueue[T]) Close()

func (ChannelQueue[T]) Pull

func (c ChannelQueue[T]) Pull() (v T, ok bool)

func (ChannelQueue[T]) Push

func (c ChannelQueue[T]) Push(v T) bool

type LinkedListQueue

type LinkedListQueue[T any] struct {
	// contains filtered or unexported fields
}

func (*LinkedListQueue[T]) Close

func (p *LinkedListQueue[T]) Close()

func (*LinkedListQueue[T]) Pull

func (p *LinkedListQueue[T]) Pull() (v T, ok bool)

func (*LinkedListQueue[T]) Push

func (p *LinkedListQueue[T]) Push(v T) bool

type Queue

type Queue[T any] interface {
	Push(v T) (ok bool)
	Pull() (v T, ok bool)
	Close()
}

func NewChannelQueue

func NewChannelQueue[T any](n int) (q Queue[T])

func NewLinkedQueue

func NewLinkedQueue[T any]() (q Queue[T])

Jump to

Keyboard shortcuts

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