lockfreequeue

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

Queue 队列对象

func NewQueue

func NewQueue(cap uint32) *Queue

NewQueue Queue构造函数 @param cap @return *Queue

func (*Queue) Capacity

func (q *Queue) Capacity() uint32

Capacity 队列容量 @return uint32

func (*Queue) Pull

func (q *Queue) Pull() (val interface{}, ok bool, quantity uint32)

Pull 从队列取出一个数据 @return val @return ok @return quantity

func (*Queue) Push

func (q *Queue) Push(val interface{}) (ok bool, quantity uint32)

Push 放入数据 @param val @return ok @return quantity

func (*Queue) Quantity

func (q *Queue) Quantity() uint32

Quantity 队列数量 @return uint32

func (*Queue) String

func (q *Queue) String() string

String 队列摘要信息 @return string

Source Files

  • annular_lockfree_queue.go

Jump to

Keyboard shortcuts

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