queue

package
v2.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 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