queue

package
v0.0.0-...-96daba7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: GPL-3.0 Imports: 2 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 interface {
	// Add a element to the list tail, return false if list is full or closed
	Add(v interface{}) bool
	// Poll retrieve the element at list head
	Poll() interface{}
	// Size return the count of elements in queue
	Size() int
	// Close signal blockQueue list to avoid endless wait
	Close()
}

Queue is the FIFO data structure

func NewBlockQueue

func NewBlockQueue(max int) Queue

NewBlockQueue construct a block queue, max is the maximum elements can add into queue.

Jump to

Keyboard shortcuts

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