package
Version:
v1.4.3
Opens a new window with list of versions in this module.
Published: May 11, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package queue 队列模块
HLQueue: wlst tcp module 定制模块,内部分为高低优先级2个队列,高优先级队列可设置先进先出或先进后出,低优先级队列只能先进先出。当高优先级队列有数据时,优先读取高优先级队列的数据
Queue: 常规队列模块
HLQueue 高低优先级队列,高优先级队列有数据时优先提取高优先级数据
NewHLQueue 创建一个高低优先级队列,低优先级队列默认先进先出
fifo: 指定高优先级队列的进出方式,true-先进先出,false-先进后出
func (q *HLQueue) Get() interface{}
Get 获取数据
func (q *HLQueue) Put(v interface{})
Put 添加低优先级数据
func (q *HLQueue) PutFront(v interface{})
PutFront 添加高优先级数据
Queue queue for go
func (mq *Queue) Get() interface{}
Get get data from front
func (mq *Queue) GetNoDel() interface{}
GetNoDel get data from front
func (mq *Queue) Put(value interface{})
Put put data to the end of the queue
func (mq *Queue) PutFront(value interface{})
PutFront put data to the first of the queue
Source Files
¶
Click to show internal directories.
Click to hide internal directories.