package
0.0.0-20241106013813-926841a6acba
Repository: https://github.com/xyzj/toolbox.git
Documentation: pkg.go.dev

# Functions

New get a new queue.
NewHighLowQueue creates a new high-low queue with the given parameters maxQueueSize, defaultQueueSize is 100.
NewPriorityQueue creates a new instance of PriorityQueue.

# Variables

ErrClosed is returned when trying to get an item from a closed queue.
ErrEmpty is returned when trying to remove an item from an empty queue.
ErrFull is returned when trying to add an item to a full queue.

# Structs

HighLowQueue 一个基于channel的高低优先级队列,先进先出,队列为空时阻塞.
PriorityQueue 一个可以设置内容优先级的队列,可设置在同等优先级下的内容先入先出或后入先出,队列为空时不阻塞.
Queue queue for go.