queue

package
v0.0.0-...-e532b39 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentLinkedListQueue

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

func (*ConcurrentLinkedListQueue) Dequeue

func (q *ConcurrentLinkedListQueue) Dequeue() (value interface{}, ok bool)

deque on empty queue will return (nil, false)

func (*ConcurrentLinkedListQueue) Enqueue

func (q *ConcurrentLinkedListQueue) Enqueue(value interface{}) (ok bool)

func (*ConcurrentLinkedListQueue) Len

func (q *ConcurrentLinkedListQueue) Len() int

type LockQueue

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

func (*LockQueue) Dequeue

func (q *LockQueue) Dequeue() (value interface{}, ok bool)

func (*LockQueue) Enqueue

func (q *LockQueue) Enqueue(value interface{}) bool

func (*LockQueue) Len

func (q *LockQueue) Len() int

type Queue

type Queue interface {
	Enqueue(value interface{}) (ok bool)
	Dequeue() (value interface{}, ok bool)
	Len() int
}

func NewConcurrentLinkedListQueue

func NewConcurrentLinkedListQueue() Queue

func NewLockQueue

func NewLockQueue() Queue

Jump to

Keyboard shortcuts

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