cqueue:使用链表在 golang 中实现循环缓冲区
队列
使用链表在 golang 中实现循环缓冲区
#####安装
go get github.com/pravj/cqueue
一个循环缓冲区结构
// CQueue represents a circular buffer data structure
type CQueue struct {
// size limit of the buffer
size int
// occupied size of the buffer
Length int
// list containing all the buffer elements
Queue * list. List
// element at the front-side of the buffer
Head * list. Element
// element at the back-