MCPcopy Create free account
hub / github.com/dustinxie/lockfree / NewQueue

Function NewQueue

list/queue.go:30–36  ·  view source on GitHub ↗

NewQueue creates a new queue

()

Source from the content-addressed store, hash-verified

28
29// NewQueue creates a new queue
30func NewQueue() *queue {
31 empty := node{}
32 return &queue{
33 head: &empty,
34 tail: &empty,
35 }
36}
37
38func (q *queue) Len() int {
39 return int(atomic.LoadUint64(&q.count))

Callers 2

NewQueueFunction · 0.92
TestQueueFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestQueueFunction · 0.56